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

Disassembly:
push ebp
lea ebp, [esp - 0x1878]
mov eax, 0x1878
call fcn.004a1280
push 0xffffffffffffffff
push 0x510f94
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0x1874], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
push 0x206
mov word [ebp + 0x166c], ax
xor ebx, ebx
lea eax, [ebp + 0x166e]
push ebx
push eax
mov esi, ecx
call fcn.0049d740
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
add esp, 0xc
push 0x104
lea eax, [ebp + 0x166c]
push eax
push str._Appdata_SogouApkToolAdb.zip
call edi
lea eax, [ebp + 0x166c]
push eax
mov ecx, str.ADBMODULE
call fcn.00417417
pop ecx
cmp eax, ebx
je 0x40e60b
xor eax, eax
push 0x206
mov word [ebp + 0x1054], ax
lea eax, [ebp + 0x1056]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
push 0x104
lea eax, [ebp + 0x1054]
push eax
push str._Appdata_SogouApkToolAndroid
call edi
call fcn.00409b27
lea eax, [ebp + 0x1054]
push eax
lea eax, [ebp + 0x166c]
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x40e60b
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1874]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0x1878
leave
ret
push str.http:__config.zhushou.sogou.com_driver__platformandroidbit32typeadbini1
lea ecx, [ebp + 0x38]
call fcn.00401685
push 0x535d58
lea ecx, [ebp + 0x1c]
mov dword [ebp - 4], ebx
call fcn.00401685
mov byte [ebp - 4], 1
call fcn.0041295e
push eax
lea eax, [ebp + 0x1c]
push eax
call fcn.00438c18
push 0x538dc0
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00409dbb
lea ecx, [ebp + 0x1c]
push ecx
push eax
lea eax, [ebp - 0x50]
push eax
mov byte [ebp - 4], 2
call fcn.0041214a
add esp, 0x20
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.004019f3
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x50]
call fcn.0040184d
push ebx
push edi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.0040184d
push str.Adb.ini
lea eax, [esi + 0x40]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00409dbb
add esp, 0xc
push 0xffffffffffffffff
push ebx
add esi, 0xcc
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.004019f3
push ebx
push edi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.0040184d
cmp dword [esi + 0x18], 8
push ebx
jb 0x40e6d1
mov eax, dword [esi + 4]
jmp 0x40e6d4
lea eax, [esi + 4]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 5
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x40e6f2
lea eax, [ebp + 0x3c]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 1
call fcn.004099a2
add esp, 0x3c
cmp eax, ebx
jge 0x40e72b
push ebx
push edi
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push edi
lea ecx, [ebp + 0x38]
call fcn.0040184d
xor al, al
jmp 0x40e5e8
xor eax, eax
push 0xffe
mov word [ebp + 0x54], ax
lea eax, [ebp + 0x56]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40e74e
mov eax, dword [esi + 4]
jmp 0x40e751
lea eax, [esi + 4]
push eax
push 0x7ff
lea eax, [ebp + 0x54]
push eax
mov edi, 0x537d6c
push edi
push 0x538be8
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x54]
push edi
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
jne 0x40e791
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push 1
jmp 0x40e71c
xor eax, eax
push 0x206
mov word [ebp + 0x1464], ax
lea eax, [ebp + 0x1466]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40e7ba
mov eax, dword [esi + 4]
jmp 0x40e7bd
lea eax, [esi + 4]
push eax
push 0x103
lea eax, [ebp + 0x1464]
push eax
push edi
push 0x538c00
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp + 0x1464]
push edi
push eax
call fcn.0049bf35
pop ecx
pop ecx
test eax, eax
je 0x40e781
lea eax, [ebp + 0x1464]
push eax
lea ecx, [ebp]
call fcn.00401685
mov byte [ebp - 4], 6
cmp dword [esi + 0x18], 8
jb 0x40e80c
mov esi, dword [esi + 4]
jmp 0x40e80f
add esi, 4
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
lea eax, [ebp]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.0047c2c2
pop ecx
pop ecx
mov byte [ebp - 4], 7
cmp dword [eax + 0x18], 0x10
jb 0x40e835
mov eax, dword [eax + 4]
jmp 0x40e838
add eax, 4
push eax
xor esi, esi
inc esi
push esi
sub esp, 0x1c
lea eax, [ebp + 0x166c]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00401685
push 0x66
sub esp, 0x1c
mov byte [ebp - 4], 8
lea eax, [ebp + 0x54]
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
call fcn.00401685
mov byte [ebp - 4], 9
call fcn.004064a6
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.0040a332
push ebx
cmp eax, ebx
push esi
lea ecx, [ebp - 0x34]
setne byte [ebp - 0xd]
mov byte [ebp - 4], 6
call fcn.004017de
cmp byte [ebp - 0xd], bl
je 0x40e8be
mov byte [ebp - 0xd], bl
push ebx
push esi
lea ecx, [ebp]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
push esi
lea ecx, [ebp + 0x38]
call fcn.0040184d
mov al, byte [ebp - 0xd]
jmp 0x40e5e8
xor eax, eax
push 0x206
mov word [ebp + 0x125c], ax
lea eax, [ebp + 0x125e]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
push 0x104
lea eax, [ebp + 0x125c]
push eax
push str._Appdata_SogouApkToolAndroid
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.00409b27
lea eax, [ebp + 0x125c]
push eax
lea eax, [ebp + 0x166c]
push eax
call fcn.0047ab3d
pop ecx
pop ecx
test eax, eax
jne 0x40e895
mov byte [ebp - 0xd], 1
jmp 0x40e898