Function at 0x52bf28
Capabilities:
Create process on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff960
push ebx
push esi
push edi
mov ebx, str.int13err2pqerr:_0x_04lX_n
mov esi, dword [ebp + 8]
call fcn.00516874
mov dword [ebp - 4], eax
lea eax, [ebx + 0xcc7]
push eax
call fcn.004adfc8
pop ecx
test esi, esi
jne 0x52bf6c
lea edx, [ebx + 0xce2]
push edx
call fcn.004adfc8
pop ecx
mov eax, 0x3be
jmp 0x52ca7c
xor edx, edx
lea ecx, [ebp - 8]
mov dword [ebp - 8], edx
push 0
push 0
push 0
push 0x1004
push esi
push ecx
call fcn.00526588
add esp, 0x18
test eax, eax
jne 0x52c05e
lea eax, [ebp - 0x10]
push eax
mov edx, dword [ebp - 8]
push edx
call fcn.005268d0
add esp, 8
test eax, eax
jne 0x52c04c
mov eax, dword [ebp - 0x10]
inc eax
push eax
call fcn.00613cd0
pop ecx
mov edi, eax
test edi, edi
jne 0x52bfd4
push 0
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.0052673c
add esp, 0xc
mov eax, 3
jmp 0x52ca7c
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
push edi
mov edx, dword [ebp - 8]
push edx
call fcn.00526828
add esp, 0x10
test eax, eax
jne 0x52c045
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
jne 0x52c045
lea edx, [ebx + 0xcfd]
push edx
call fcn.004adfc8
pop ecx
lea ecx, [ebx + 0xd4d]
push ecx
call fcn.004adfc8
pop ecx
xor eax, eax
mov edx, edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x14]
jae 0x52c045
mov eax, dword [ebp - 0x30]
movsx edx, byte [eax]
push edx
lea ecx, [ebx + 0xda4]
push ecx
call fcn.004adfc8
add esp, 8
inc dword [ebp - 0x18]
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jb 0x52c021
push edi
call fcn.00613cc0
pop ecx
push 0
push 0
mov edx, dword [ebp - 8]
push edx
call fcn.0052673c
add esp, 0xc
jmp 0x52c06e
push esi
lea ecx, [ebx + 0xda7]
push ecx
call fcn.004adfc8
add esp, 8
push 0x10000
mov eax, dword [0x6a7054]
push eax
call fcn.0053ae14
add esp, 8
test al, al
je 0x52c08c
xor eax, eax
jmp 0x52ca7c
xor edx, edx
lea edi, [ebp - 0x198]
mov dword [ebp - 0x1c], edx
mov ecx, 5
mov byte [ebp - 0x1d], 0
push esi
mov esi, str.PMagicB.PIF
rep movsd dword es:[edi], dword [esi]
pop esi
xor eax, eax
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x184]
push 0x100
push edx
call fcn.0052ca84
add esp, 8
lea ecx, [ebx + 0xded]
push ecx
lea eax, [ebp - 0x184]
push eax
call fcn.00614794
add esp, 8
lea edx, [ebx + 0xdf7]
push edx
lea ecx, [ebp - 0x184]
push ecx
call fcn.00527554
add esp, 8
mov edi, eax
test edi, edi
je 0x52c9b3
push esi
lea eax, [ebx + 0xdf9]
push eax
lea edx, [ebp - 0x298]
push edx
call fcn.00618418
add esp, 0xc
lea ecx, [ebp - 0x298]
push ecx
call fcn.006148a0
pop ecx
push eax
lea eax, [ebp - 0x298]
push eax
push edi
call fcn.005275bc
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x52c173
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0
je 0x52c173
mov ecx, dword [ebp + 0xc]
push ecx
lea eax, [ebx + 0xe09]
push eax
lea edx, [ebp - 0x298]
push edx
call fcn.00618418
add esp, 0xc
lea ecx, [ebp - 0x298]
push ecx
call fcn.006148a0
pop ecx
push eax
lea eax, [ebp - 0x298]
push eax
push edi
call fcn.005275bc
add esp, 0xc
cmp dword [ebp + 0x10], 0
je 0x52c1b1
mov edx, dword [ebp + 0x10]
push edx
lea ecx, [ebx + 0xe17]
push ecx
lea eax, [ebp - 0x298]
push eax
call fcn.00618418
add esp, 0xc
lea edx, [ebp - 0x298]
push edx
call fcn.006148a0
pop ecx
push eax
lea ecx, [ebp - 0x298]
push ecx
push edi
call fcn.005275bc
add esp, 0xc
mov eax, dword [0x6a5df4]
push eax
call fcn.005324ec
pop ecx
test al, al
jne 0x52c1f5
lea edx, [ebx + 0xe25]
push edx
lea ecx, [ebp - 0x298]
push ecx
call fcn.00618418
add esp, 8
lea eax, [ebp - 0x298]
push eax
call fcn.006148a0
pop ecx
push eax
lea edx, [ebp - 0x298]
push edx
push edi
call fcn.005275bc
add esp, 0xc
push edi
call fcn.00527578
pop ecx
push 0x100
lea ecx, [ebp - 0x184]
push ecx
call fcn.0052ca84
mov dword [ebp - 0x74], 0x44
xor eax, eax
xor edx, edx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], eax
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x5c], ecx
xor eax, eax
xor edx, edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x50], ecx
xor edx, edx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], edx
mov word [ebp - 0x44], 0
mov word [ebp - 0x42], 0
xor ecx, ecx
add esp, 8
mov dword [ebp - 0x40], ecx
cmp dword [ebp - 4], 0x400
jne 0x52c570
push 0x100
lea eax, [ebp - 0x398]
push eax
lea edx, [ebp - 0x184]
push edx
call sub.KERNEL32.DLL_GetShortPathNameA
lea ecx, [ebx + 0xe4a]
push ecx
lea eax, [ebx + 0xe3c]
push eax
call fcn.00616f58
add esp, 8
mov esi, eax
test esi, esi
je 0x52c2ab
xor edi, edi
push esi
call fcn.00616aac
pop ecx
jmp 0x52c2c3
lea eax, [ebx + 0xe5b]
push eax
lea edx, [ebx + 0xe4d]
push edx
call fcn.00617c0c
add esp, 8
mov edi, eax
test edi, edi
jne 0x52c2e1
lea eax, [ebx + 0xe77]
push eax
lea edx, [ebx + 0xe69]
push edx
call fcn.00616f58
add esp, 8
mov esi, eax
jmp 0x52c302
lea eax, [ebx + 0xe88]
push eax
lea edx, [ebx + 0xe7a]
push edx
call fcn.00616f58
add esp, 8
mov esi, eax
push esi
call fcn.00616aac
pop ecx
xor esi, esi
lea eax, [ebx + 0xe99]
push eax
lea edx, [ebx + 0xe8b]
push edx
call fcn.00616f58
add esp, 8
mov edi, eax
test edi, edi
je 0x52c38d
test esi, esi
je 0x52c372
push esi
push 0x100
push 1
lea eax, [ebp - 0x498]
push eax
call fcn.00617238
add esp, 0x10
test eax, eax
je 0x52c36b
push edi
push eax
push 1
lea edx, [ebp - 0x498]
push edx
call fcn.006173d8
add esp, 0x10
push esi
push 0x100
push 1
lea ecx, [ebp - 0x498]
push ecx
call fcn.00617238
add esp, 0x10
test eax, eax
jne 0x52c33d
push esi
call fcn.00616aac
pop ecx
push edi
push 0xc
push 1
lea eax, [ebx + 0xe9c]
push eax
call fcn.006173d8
add esp, 0x10
push edi
call fcn.00616aac
pop ecx
lea edx, [ebx + 0xeb9]
push edx
lea ecx, [ebx + 0xea9]
push ecx
call fcn.00616f58
add esp, 8
mov esi, eax
test esi, esi
je 0x52c3b4
xor edi, edi
push esi
call fcn.00616aac
pop ecx
jmp 0x52c3cc
lea eax, [ebx + 0xecc]
push eax
lea edx, [ebx + 0xebc]
push edx
call fcn.00617c0c
add esp, 8
mov edi, eax
test edi, edi
jne 0x52c3ea
lea eax, [ebx + 0xeec]
push eax
lea edx, [ebx + 0xedc]
push edx
call fcn.00616f58
add esp, 8
mov esi, eax
jmp 0x52c40b
lea eax, [ebx + 0xeff]
push eax
lea edx, [ebx + 0xeef]
push edx
call fcn.00616f58
add esp, 8
mov esi, eax
push esi
call fcn.00616aac
pop ecx
xor esi, esi
lea eax, [ebx + 0xf12]
push eax
lea edx, [ebx + 0xf02]
push edx
call fcn.00616f58
add esp, 8
mov edi, eax
test edi, edi
je 0x52c9c7
push edi
push 0xa
push 1
lea eax, [ebx + 0xf15]
push eax
call fcn.006173d8
add esp, 0x10
test esi, esi
je 0x52c493
push esi
push 0x100
push 1
lea edx, [ebp - 0x498]
push edx
call fcn.00617238
add esp, 0x10
test eax, eax
je 0x52c48c
push edi
push eax
push 1
lea ecx, [ebp - 0x498]
push ecx
call fcn.006173d8
add esp, 0x10
push esi
push 0x100
push 1
lea eax, [ebp - 0x498]
push eax
call fcn.00617238
add esp, 0x10
test eax, eax
jne 0x52c45e
push esi
call fcn.00616aac
pop ecx
movsx eax, byte [ebp - 0x398]
cmp eax, 0x43
je 0x52c4e0
cmp eax, 0x63
je 0x52c4e0
push edi
push 1
push 1
lea edx, [ebx + 0xf21]
push edx
call fcn.006173d8
add esp, 0x10
push edi
push 1
push 1
lea ecx, [ebp - 0x398]
push ecx
call fcn.006173d8
add esp, 0x10
push edi
push 1
push 1
lea eax, [ebx + 0xf23]
push eax
call fcn.006173d8
add esp, 0x10
push edi
push 4
push 1
lea edx, [ebx + 0xf25]
push edx
call fcn.006173d8
add esp, 0x10
lea ecx, [ebp - 0x398]
push ecx
call fcn.006148a0
pop ecx
movsx eax, byte [ebp + eax - 0x399]
cmp eax, 0x5c
jne 0x52c523
lea edx, [ebp - 0x398]
push edx
call fcn.006148a0
pop ecx
mov byte [ebp + eax - 0x399], 0
push edi
lea ecx, [ebp - 0x398]
push ecx
call fcn.006148a0
pop ecx
push eax
push 1
lea eax, [ebp - 0x398]
push eax
call fcn.006173d8
add esp, 0x10
push edi
push 0x12
push 1
lea edx, [ebx + 0xf2a]
push edx
call fcn.006173d8
add esp, 0x10
push edi
call fcn.00616aac
pop ecx
lea ecx, [ebx + 0xf3e]
push ecx
call fcn.0052bed0
pop ecx
jmp 0x52c9c7
cmp dword [ebp - 4], 0x100
je 0x52c586
cmp dword [ebp - 4], 0x200
jne 0x52c60b
lea eax, [ebp - 0x198]
push eax
lea edx, [ebp - 0x184]
push edx
call fcn.00614794
add esp, 8
lea ecx, [ebp - 0x184]
push ecx
lea eax, [ebx + 0xf6c]
push eax
call fcn.004adfc8
add esp, 8
lea edx, [ebp - 0x84]
lea ecx, [ebp - 0x74]
lea eax, [ebp - 0x184]
push edx
push ecx
push 0
push 0
push 8
push 0
push 0
push 0
push 0
push eax
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
je 0x52c5e5
xor edx, edx
mov dword [ebp - 0x1c], edx
jmp 0x52c9c7
call sub.KERNEL32.DLL_GetLastError
push eax
lea ecx, [ebx + 0xf7a]
push ecx
call fcn.004adfc8
mov dword [ebp - 0x1c], 0x53
add esp, 8
jmp 0x52c9c7
cmp dword [ebp - 4], 0x800
jne 0x52c9c7
push 0x104
lea eax, [ebp - 0x59c]
push eax
call fcn.0052ca84
add esp, 8
test eax, eax
jne 0x52c63c
mov dword [ebp - 0x1c], 0xba
jmp 0x52c9c7
lea edx, [ebp - 0x59c]
push edx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
test eax, eax
jne 0x52c658
mov dword [ebp - 0x1c], 0xba
jmp 0x52c9c7
push 0
mov ecx, dword [0x67939c]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x28]
pop ecx
push eax
push 0x4000000
push 0x1ca
mov edx, dword [0x68bfe8]
push edx
call fcn.004c6c0c
add esp, 8
mov ecx, dword [0x67939c]
push eax
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
add esp, 0x14
lea edx, [ebx + 0xfb0]
mov byte [ebp - 0x1d], 1
push edx
lea ecx, [ebx + 0xf9d]
push ecx
call fcn.00616f58
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x52c6bb
mov dword [ebp - 0x1c], 0xc0
cmp dword [ebp - 0x1c], 0
jne 0x52c9c7
mov eax, dword [ebp - 0x28]
push eax
call fcn.00616aac
pop ecx
lea edx, [ebx + 0xfb3]
push edx
call fcn.004adfc8
pop ecx
lea eax, [ebp - 0x74]
lea ecx, [ebp - 0x84]
lea edx, [ebx + 0xfdb]
push ecx
push eax
push 0
push 0
push 8
push 0
push 0
push 0
push edx
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x52c726
call sub.KERNEL32.DLL_GetLastError
push eax
lea ecx, [ebx + 0xff6]
push ecx
call fcn.004adfc8
mov dword [ebp - 0x1c], 0x53
add esp, 8
jmp 0x52c9c7
lea eax, [ebx + 0x1019]
push eax
call fcn.004adfc8
pop ecx
lea edx, [ebp - 0x24]
push edx
mov ecx, dword [ebp - 0x84]
push ecx
call sub.KERNEL32.DLL_GetExitCodeProcess
test eax, eax
jne 0x52c766
mov eax, dword [ebp - 0x24]
push eax
lea edx, [ebx + 0x1046]
push edx
call fcn.004adfc8
mov dword [ebp - 0x1c], 0xbb
add esp, 8
jmp 0x52c9c7
cmp dword [ebp - 0x24], 0x103
je 0x52c733
cmp dword [ebp - 0x24], 0
je 0x52c7b0
mov ecx, dword [ebp - 0x24]
push ecx
lea eax, [ebx + 0x1080]
push eax
call fcn.004adfc8
add esp, 8
push 0
mov edx, dword [ebp - 0x24]
push edx
push 0x60
push 0xbc
mov ecx, dword [0x6c5dd4]
push ecx
call fcn.00523cb8
mov dword [ebp - 0x1c], 0xbc
add esp, 0x14
jmp 0x52c9c7
lea eax, [ebx + 0x10ba]
push eax
call fcn.004adfc8
pop ecx
push 0x104
push 0
lea edx, [ebp - 0x59c]
push edx
call fcn.006146f0
add esp, 0xc
lea ecx, [ebp - 0x6a0]
push 0x104
push 0
push ecx
call fcn.006146f0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x59c]
push eax
call fcn.0052ca84
add esp, 8
lea edx, [ebx + 0x10e9]
push edx
lea ecx, [ebx + 0x10d8]
push ecx
call fcn.00616f58
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x52c823
mov dword [ebp - 0x1c], 0xc0
cmp dword [ebp - 0x1c], 0
jne 0x52c9c7
mov eax, dword [ebp - 0x28]
push eax
call fcn.00616aac
pop ecx
lea edx, [ebp - 0x59c]
push edx
lea ecx, [ebx + 0x10ec]
push ecx
lea eax, [ebp - 0x6a0]
push eax
call sub.USER32.DLL_wsprintfA
add esp, 0xc
lea edx, [ebp - 0x6a0]
push edx
lea ecx, [ebx + 0x111f]
push ecx
call fcn.004adfc8
add esp, 8
lea eax, [ebp - 0x84]
lea edx, [ebp - 0x74]
lea ecx, [ebp - 0x6a0]
push eax
push edx
push 0
push 0
push 8
push 0
push 0
push 0
push ecx
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x52c8b4
call sub.KERNEL32.DLL_GetLastError
push eax
lea eax, [ebx + 0x112f]
push eax
call fcn.004adfc8
mov dword [ebp - 0x1c], 0x53
add esp, 8
jmp 0x52c9c7
lea edx, [ebx + 0x1152]
push edx
call fcn.004adfc8
pop ecx
lea ecx, [ebp - 0x24]
push ecx
mov eax, dword [ebp - 0x84]
push eax
call sub.KERNEL32.DLL_GetExitCodeProcess
test eax, eax
jne 0x52c8f4
mov edx, dword [ebp - 0x24]
push edx
lea ecx, [ebx + 0x1183]
push ecx
call fcn.004adfc8
mov dword [ebp - 0x1c], 0xbd
add esp, 8
jmp 0x52c9c7
cmp dword [ebp - 0x24], 0x103
je 0x52c8c1
cmp dword [ebp - 0x24], 0
je 0x52c997
mov eax, dword [ebp - 0x24]
push eax
lea edx, [ebx + 0x11c0]
push edx
call fcn.004adfc8
add esp, 8
cmp dword [ebp - 0x24], 0xc
jne 0x52c947
push 0
mov ecx, dword [ebp - 0x24]
push ecx
push 0x60
push 0xc5
mov eax, dword [0x6c5dd4]
push eax
call fcn.00523cb8
mov dword [ebp - 0x1c], 0xc5
add esp, 0x14
jmp 0x52c9c7
cmp dword [ebp - 0x24], 0x11
jne 0x52c972
push 0
mov edx, dword [ebp - 0x24]
push edx
push 0x60
push 0xc4
mov ecx, dword [0x6c5dd4]
push ecx
call fcn.00523cb8
mov dword [ebp - 0x1c], 0xc4
add esp, 0x14
jmp 0x52c9c7
push 0
mov eax, dword [ebp - 0x24]
push eax
push 0x60
push 0xbe
mov edx, dword [0x6c5dd4]
push edx
call fcn.00523cb8
mov dword [ebp - 0x1c], 0xbe
add esp, 0x14
jmp 0x52c9c7
lea ecx, [ebx + 0x11fd]
push ecx
call fcn.004adfc8
pop ecx
lea eax, [ebx + 0x121e]
push eax
call fcn.0052bed0
pop ecx
jmp 0x52c9c7
lea edx, [ebx + 0x1240]
push edx
call fcn.004adfc8
pop ecx
mov dword [ebp - 0x1c], 0x3be
cmp byte [ebp - 0x1d], 0
je 0x52c9da
mov ecx, dword [0x67939c]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
pop ecx
cmp dword [ebp - 4], 0x800
jne 0x52ca69
cmp dword [ebp - 0x1c], 0
je 0x52ca69
mov edx, dword [ebp - 0x1c]
push edx
lea ecx, [ebx + 0x1265]
push ecx
call fcn.004adfc8
add esp, 8
xor eax, eax
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x2c]
push edx
call fcn.0052b37c
pop ecx
test eax, eax
je 0x52ca18
mov eax, dword [ebp - 0x1c]
jmp 0x52ca7c
mov edx, dword [ebp - 0x2c]
movzx ecx, word [edx + 0x16]
shl ecx, 9
push ecx
call fcn.00613cd0
pop ecx
mov ebx, eax
test ebx, ebx
je 0x52ca62
mov eax, dword [ebp - 0x2c]
movzx edx, word [eax + 0x16]
push edx
push ebx
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00529b3c
add esp, 0x10
test eax, eax
jne 0x52ca62
mov eax, dword [ebp - 0x2c]
mov ecx, dword [0x680974]
movzx edx, word [eax + 0x16]
push edx
push ebx
push ecx
call fcn.004adff4
add esp, 0xc
push ebx
call fcn.00613cc0
pop ecx
cmp dword [ebp - 0x28], 0
je 0x52ca79
mov eax, dword [ebp - 0x28]
push eax
call fcn.004e598c
pop ecx
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret