==== Example 1 ====
.method private isValid([Ljava/lang/String;[Ljava/lang/String;Ljava/math/BigInteger;)Ljava/lang/Boolean;
.locals 7 // 메소드 내부에서 사용하는 레지스터 수 ex. v1~v7
.parameter "issuerDN" // 파라미터 이름, 뒤에서부터, p3
.parameter "subjectDN" // p2
.parameter "serial" // p1
.prologue
const/4 v6, 0x4 // v6 = 0x4
const/4 v5, 0x3 // v5 = 0x3
const/4 v4, 0x2 // v4 = 0x2
const/4 v3, 0x1 // v3 = 0x1
const/4 v2, 0x0 // v2 = 0x0
.line 103
aget-object v0, p1, v2 // v0 = p1[v2], v0 = serial[v2], array[] (p1)의 특정 index(v2) 의 값을 v0에 저장
// p0 는 this 인듯...
iget-object v1, p0, Lops/black/herpderper/TrustModifier$AlwaysTrustManager;->CN1:Ljava/lang/String; // v1 = this.AlwaysTrustManager->C1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z // v0 = String->equals(v0, v1);
move-result v0
if-eqz v0, :cond_0 // v0가 0 이면 cond_0 로 점프
aget-object v0, p1, v3
iget-object v1, p0, Lops/black/herpderper/TrustModifier$AlwaysTrustManager;->OU:Ljava/lang/String; // AlwaysTrustManager->OU
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0 // if(v0 == 0) goto cond_0;
...
.line 119
invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; // v0 = Boolean->valueOf(v3);
move-result-object v0
.line 121
:goto_0
return-object v0 // return v0;
:cond_0
invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; // v0 = Boolean->valueOf(v2); // v2=0=false
move-result-object v0
goto :goto_0
==== Result 1 ====
private Boolean isValid(String[] serial, String[] subjectDN, BigInteger issuerDN) {
v6=4;
v5=3;
v4=2;
v3=1;
v2=0;
v0 = serial[v2];
v1 = AlwaysTrustManager->C1;
v0 = String->equals(v0, v1);
if(v0 == 0)
goto cond_0;
v0 = serial[v3];
v1 = AlwaysTrustManager->OU;
v0 = String->equals(v0, v1);
if(v0 == 0)
goto cond_0;
...
v0 = Boolean->valueOf(v3); // v3=1=true
:goto_0
return v0;
:cond_0
v0 = Boolean->valueOf(v2); // v2=0=false
goto: goto_0;
==== Example 2 ====
# virtual methods
.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/String;
.locals 17
.parameter "uri"
.prologue
.line 28
invoke-static {}, Landroid/os/Debug;->isDebuggerConnected()Z
move-result v14
if-eqz v14, :cond_0
.line 29
const/16 v14, 0x539
div-int/lit8 v14, v14, 0x0
.line 31
:cond_0
const/4 v11, 0x0
.line 34
.local v11, url:Ljava/net/URL;
:try_start_0
new-instance v12, Ljava/net/URL;
const/4 v14, 0x0
aget-object v14, p1, v14
invoke-direct {v12, v14}, Ljava/net/URL;-><init>(Ljava/lang/String;)V // <init>() 괄호 안에 변수 갯수 = 파라미터 갯수, 즉 v14만 파라미터 v12 는 리턴값 저장
:try_end_0
.catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_1
.end local v11 #url:Ljava/net/URL; // 이런건 다 코멘트
.local v12, url:Ljava/net/URL;
move-object v11, v12
.line 41
.end local v12 #url:Ljava/net/URL;
.restart local v11 #url:Ljava/net/URL;
:goto_0
const/4 v13, 0x0
.line 44
.local v13, urlConnection:Ljava/net/HttpURLConnection;
:try_start_1
invoke-virtual {v11}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object v14
move-object v0, v14
check-cast v0, Ljava/net/HttpURLConnection;
move-object v13, v0
.line 47
const/4 v14, 0x1
invoke-virtual {v13, v14}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V // Z -> 하나의 파라미터 나타냄, v13.HttpURLConnection->setDoOutput(v14);
.line 48
const-string v14, "POST"
invoke-virtual {v13, v14}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
.line 51
invoke-static {v13}, Lops/black/herpderper/TrustModifier;->relaxHostChecking(Ljava/net/HttpURLConnection;)V
.line 52
invoke-virtual {v13}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;
move-result-object v5
.line 55
.local v5, out:Ljava/io/OutputStream; // v5 = get_OutputStream();
const/4 v14, 0x1
aget-object v14, p1, v14
const-string v15, "UTF-8"
...
:catch_1
move-exception v1
.line 38
.local v1, e1:Ljava/net/MalformedURLException;
invoke-virtual {v1}, Ljava/net/MalformedURLException;->printStackTrace()V
goto/16 :goto_0
==== Result 2 ====
protected String doInBackground(String[] uri) {
v14 = android.os.Debug.isDebuggerConnected();
if(v14==0)
goto cond_0;
v14 = 0x539;
v14 = v14 / 0;
:cond_0
v11 = 0;
v11 = url:Ljava/net/URL;
:try_start_0
v12 = java/net/URL;
v14 = 0;
v14 = uri[v14]; // v14 = uri[0];
v12 = URL->init(v14);
:try_end_0
.catch MalformedURLException :catch_1
v11 = (java/net/URL) v12;
:goto_0
v13 = 0;
v13 = (HttpURLConnection) v13;
:try_start_1
v14 = URL->openConnection(v11);
v0 = v14;
v0 = (HttpURLConnection) v0;
v13 = v0;
v14 = 1;
v13.setDoOutput(v14);
v14 = "POST";
v13.setRequestMethod(v14);
ops.black.herpderper.TrustModifier.relaxHostChecking(v13);
v5 = getOutputStream(v13);
v14 = 1;
v14 = uri[v14];