Function at 0x409284
Capabilities:
Check if file exists
Copy file
Create directory
Create process on windows
Query environment variable

Disassembly:
push ebp
sub esp, 0x858
lea ebp, [esp - 4]
mov eax, dword [0x551bd0]
xor eax, ebp
mov dword [ebp + 0x858], eax
push 0x74
mov eax, 0x50e8ae
call fcn.0049dfed
xor ebx, ebx
lea edi, [ebp - 0xd]
mov byte [ebp - 0xd], bl
call fcn.0040907a
cmp byte [ebp - 0xd], bl
jne 0x4094ff
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp + 0x448], ax
lea eax, [ebp + 0x44a]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
mov esi, 0x104
push esi
lea eax, [ebp + 0x448]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp + 0x448]
push eax
lea ecx, [ebp - 0x80]
call fcn.00401685
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp]
push eax
mov dword [ebp - 4], ebx
call fcn.0047b4b4
pop ecx
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 2
call fcn.0040184d
push 0x535d58
lea ecx, [ebp]
call fcn.00403d14
test eax, eax
je 0x4094f4
xor eax, eax
push edi
mov word [ebp + 0x650], ax
lea eax, [ebp + 0x652]
push ebx
push eax
call fcn.0049d740
xor eax, eax
push edi
mov word [ebp + 0x240], ax
lea eax, [ebp + 0x242]
push ebx
push eax
call fcn.0049d740
mov eax, dword [ebp + 4]
add esp, 0x18
cmp dword [ebp + 0x18], 8
jae 0x409373
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x240]
push str.__appdata__SogouApkTool_sSogouApkTool.exe
push eax
call fcn.00401e39
add esp, 0xc
push esi
lea eax, [ebp + 0x650]
push eax
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp + 0x650]
push eax
lea ecx, [ebp + 0x1c]
call fcn.00401685
lea eax, [ebp + 0x650]
push eax
mov byte [ebp - 4], 3
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push ebx
lea eax, [ebp + 0x650]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [ebp + 0x20]
push 8
pop esi
cmp dword [ebp + 0x34], esi
jae 0x4093da
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x409407
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x34], esi
jae 0x4093f0
lea eax, [ebp + 0x20]
push ebx
push eax
lea eax, [ebp + 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4094e9
call fcn.0047ace6
test eax, eax
jne 0x409470
push 0x38
lea eax, [ebp - 0x58]
push ebx
push eax
call fcn.0049d740
mov eax, dword [ebp + 0x20]
add esp, 0xc
mov dword [ebp - 0x5c], 0x3c
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], str.runas
cmp dword [ebp + 0x34], esi
jae 0x40943b
lea eax, [ebp + 0x20]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x5c]
push eax
mov dword [ebp - 0x58], 0x40
mov dword [ebp - 0x48], str._addasso
mov dword [ebp - 0x40], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x4094e9
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4094e9
xor eax, eax
push edi
mov word [ebp + 0x38], ax
lea eax, [ebp + 0x3a]
push ebx
push eax
call fcn.0049d740
push str._addasso
lea eax, [ebp + 0x38]
push str.SogouApkTool.exe__s
push eax
call fcn.00401e39
push 0x44
pop edi
push edi
lea eax, [ebp - 0x64]
push ebx
push eax
call fcn.0049d740
mov dword [ebp - 0x64], edi
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0x24
stosd dword es:[edi], eax
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x34], esi
jae 0x4094bc
lea eax, [ebp + 0x20]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x64]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp + 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4094e9
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
push ebx
push 1
lea ecx, [ebp + 0x1c]
call fcn.0040184d
push ebx
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 + 0x858]
xor ecx, ebp
call fcn.0049a49b
add ebp, 0x85c
leave
ret