Function at 0x412a9f
Capabilities:
Query environment variable
Read .ini file

Disassembly:
push ebp
sub esp, 0xb7c
lea ebp, [esp - 4]
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0xb7c], eax
push 0x24
mov eax, 0x50f4ae
call fcn.0049dfed
xor eax, eax
mov ebx, 0x206
push ebx
mov word [ebp + 0x874], ax
xor esi, esi
lea eax, [ebp + 0x876]
push esi
push eax
call fcn.0049d740
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp + 0x874]
push eax
push str._Appdata_SogouApkTool
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
push ebx
mov word [ebp + 0x66c], ax
lea eax, [ebp + 0x66e]
push esi
push eax
call fcn.0049d740
add esp, 0xc
push edi
lea eax, [ebp + 0x66c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp + 0x66c]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401685
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp]
push eax
mov dword [ebp - 4], esi
call fcn.0047b4b4
pop ecx
pop ecx
push esi
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.0040184d
lea eax, [ebp + 0x66c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov esi, 0x538040
push esi
lea eax, [ebp + 0x874]
push edi
push eax
call fcn.0049bcab
mov eax, dword [ebp + 4]
add esp, 0xc
cmp dword [ebp + 0x18], 8
jae 0x412b84
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x874]
push edi
push eax
call fcn.0049bcab
push esi
lea eax, [ebp + 0x874]
push edi
push eax
call fcn.0049bcab
add esp, 0x18
lea eax, [ebp + 0x874]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push str.apktool.ini
lea eax, [ebp + 0x874]
push edi
push eax
call fcn.0049bcab
add esp, 0xc
push str.laststartpb
lea ecx, [ebp + 0x1c]
call fcn.00401685
mov byte [ebp - 4], 3
call fcn.0041295e
push eax
lea ecx, [ebp + 0x1c]
call fcn.00403850
xor eax, eax
push ebx
push eax
mov word [ebp + 0x464], ax
lea eax, [ebp + 0x466]
push eax
call fcn.0049d740
push 0x12d
lea esi, [ebp + 0x464]
call fcn.0041721b
add esp, 0x10
mov eax, esi
push eax
lea ecx, [ebp + 0x1c]
call fcn.00403850
xor eax, eax
push ebx
push eax
mov word [ebp + 0x54], ax
lea eax, [ebp + 0x56]
push eax
call fcn.0049d740
mov eax, dword [ebp + 0x20]
add esp, 0xc
cmp dword [ebp + 0x34], 8
jae 0x412c3b
lea eax, [ebp + 0x20]
lea ecx, [ebp + 0x874]
push ecx
push edi
lea ecx, [ebp + 0x54]
push ecx
mov esi, 0x535d58
push esi
push eax
push str.Pingback
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x50], 7
call fcn.00401afa
mov byte [ebp - 4], 4
mov ecx, esi
lea eax, [ebp + 0x54]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x412c99
test dx, dx
je 0x412c95
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x412c99
add eax, 4
add ecx, 4
test dx, dx
jne 0x412c73
xor eax, eax
jmp 0x412c9e
sbb eax, eax
sbb eax, 0xffffffff
xor esi, esi
lea ecx, [ebp + 0x38]
cmp eax, esi
jne 0x412cae
push str.ST1
jmp 0x412cb3
push str.ST0
call fcn.00401829
xor eax, eax
push 0x7e
mov word [ebp + 0xafc], ax
lea eax, [ebp + 0xafe]
push esi
push eax
call fcn.0049d740
xor eax, eax
push 0x7e
mov word [ebp + 0xa7c], ax
lea eax, [ebp + 0xa7e]
push esi
push eax
call fcn.0049d740
push 0x40
lea eax, [ebp + 0xa7c]
push eax
lea eax, [ebp + 0xafc]
push 0x40
push eax
call fcn.0047ff96
add esp, 0x28
test eax, eax
je 0x412d68
push str.OS_V
lea ecx, [ebp + 0x38]
call fcn.00403850
lea eax, [ebp + 0xafc]
push eax
lea ecx, [ebp + 0x38]
call fcn.00403850
push str.OS_L
lea ecx, [ebp + 0x38]
call fcn.00403850
lea eax, [ebp + 0xa7c]
push eax
lea ecx, [ebp + 0x38]
call fcn.00403850
push str.OS_B
lea ecx, [ebp + 0x38]
call fcn.00403850
call fcn.0047ff5d
lea ecx, [ebp + 0x38]
test eax, eax
je 0x412d5e
push 0x5394b4
jmp 0x412d63
push 0x5394bc
call fcn.00403850
mov eax, str.STMD0
cmp dword [0x55a430], esi
jne 0x412d7a
mov eax, str.STMD1
push eax
lea ecx, [ebp + 0x38]
call fcn.00403850
cmp dword [ebp + 0x50], 8
mov esi, dword [ebp + 0x3c]
jae 0x412d8f
lea esi, [ebp + 0x3c]
call fcn.004129fb
push eax
call fcn.0041295e
push eax
push esi
push str.sat_st.gif
call fcn.00438e15
add esp, 0x10
test eax, eax
je 0x412e0b
lea eax, [ebp - 0x14]
push eax
call fcn.0049bd5f
xor eax, eax
push ebx
push eax
mov word [ebp + 0x25c], ax
lea eax, [ebp + 0x25e]
push eax
call fcn.0049d740
push 0xa
push edi
lea eax, [ebp + 0x25c]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.0049b785
mov eax, dword [ebp + 0x20]
add esp, 0x24
cmp dword [ebp + 0x34], 8
jae 0x412df1
lea eax, [ebp + 0x20]
lea ecx, [ebp + 0x874]
push ecx
lea ecx, [ebp + 0x25c]
push ecx
push eax
push str.Pingback
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor esi, esi
push esi
push 1
lea ecx, [ebp + 0x38]
call fcn.0040184d
push esi
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push esi
push 1
lea ecx, [ebp]
call fcn.0040184d
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xb7c]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0xb80
leave
ret