Function at 0x40ca60
Capabilities:
Set current directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6612c4
mov eax, dword fs:[0]
push eax
sub esp, 0x828
mov eax, dword [0x714f78]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x824], esi
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x820], esi
push eax
mov dword [ebp - 4], 0
call fcn.00407fb0
add esp, 4
push eax
lea ecx, [esi + 0x688]
mov byte [ebp - 4], 1
call fcn.00409ef0
mov edx, dword [ebp - 0x81c]
or edi, 0xffffffff
mov byte [ebp - 4], 0
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cbbb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40cbbb
mov edx, dword [esi + 0x688]
lea ebx, [esi + 0x688]
mov dword [ebp - 4], 0xffffffff
cmp dword [edx - 4], 1
jle 0x40cbe0
push dword [edx - 0xc]
mov ecx, ebx
call fcn.00402a60
mov edx, dword [ebx]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x81c], eax
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cbf0
sub ecx, dword [ebp - 0x81c]
cmp byte [edx + ecx - 1], 0x5c
je 0x40cc4c
push 0x687b0c
lea eax, [ebp - 0x81c]
push ebx
push eax
call fcn.00406fc0
add esp, 0xc
push eax
mov ecx, ebx
mov dword [ebp - 4], 5
call fcn.00409ef0
mov edx, dword [ebp - 0x81c]
mov eax, edi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cc4c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x686f7f
push dword [ebx]
call fcn.00623866
add esp, 8
test eax, eax
je 0x40cec1
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.004237e3
mov ecx, eax
test ecx, ecx
je 0x40cedb
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x820], eax
lea eax, [ebp - 0x414]
mov dword [ebp - 4], 6
push eax
lea ecx, [ebp - 0x820]
call fcn.00402920
test al, al
jne 0x40ccdc
lea ecx, [ebp - 0x414]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ccc0
sub ecx, edx
lea eax, [ebp - 0x414]
push ecx
push eax
lea ecx, [ebp - 0x820]
call fcn.00408780
lea eax, [ebp - 0x414]
mov dword [ebp - 4], 7
push eax
call fcn.0040c670
add esp, 4
mov esi, eax
call fcn.004237e3
mov ecx, eax
test ecx, ecx
je 0x40cee5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x818], eax
push esi
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 8
call fcn.00402920
test al, al
jne 0x40cd48
test esi, esi
jne 0x40cd2d
xor ecx, ecx
jmp 0x40cd3b
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cd32
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x818]
call fcn.00408780
mov edi, dword [ebp - 0x818]
lea ecx, [ebp - 0x820]
push 0x686f7f
push edi
mov byte [ebp - 4], 9
call fcn.00410590
mov esi, dword [ebp - 0x820]
test esi, esi
je 0x40ceb7
push esi
push dword [ebx]
call fcn.0062693d
add esp, 8
test eax, eax
je 0x40cddf
call fcn.004237e3
mov ecx, eax
test ecx, ecx
je 0x40ceb7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x81c], eax
push dword [ebx]
lea eax, [ebp - 0x81c]
mov byte [ebp - 4], 0xa
push 0x688028
push eax
call fcn.00402b10
mov esi, dword [ebp - 0x824]
add esp, 0xc
mov ecx, esi
push 0x24
push 0x688080
push dword [ebp - 0x81c]
call fcn.0042822f
cmp eax, 7
jne 0x40cef6
jmp 0x40ceef
push ecx
lea eax, [edi - 0x10]
mov dword [ebp - 0x82c], esp
mov ebx, esp
mov dword [ebp - 0x828], ebx
push eax
mov dword [ebp - 0x81c], eax
call fcn.00407700
add eax, 0x10
mov dword [ebx], eax
mov ebx, dword [ebp - 0x824]
mov edi, esp
add ebx, 0x688
mov dword [ebp - 0x828], esp
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x830], edi
mov eax, dword [ebx]
sub eax, 0x10
push eax
call fcn.00407700
add eax, 0x10
mov dword [edi], eax
mov eax, esp
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x818]
push ecx
push ebx
push eax
call fcn.00409f60
mov ecx, dword [ebp - 0x824]
add esp, 0xc
mov byte [ebp - 4], 9
call fcn.0040bc50
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [ebp - 0x81c]
or edi, 0xffffffff
mov byte [ebp - 4], 7
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ce7f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40ce9b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0060249b
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004020e0
push 0
push 0x688004
push 0x68800c
mov ecx, esi
call fcn.0042822f
push 0
call fcn.0062403e
push 0x80004005
call fcn.004020e0
push 0x80004005
call fcn.004020e0
push 0
call fcn.0062403e
push ecx
mov ecx, esp
mov dword [ebp - 0x824], esp
push 0x686f7f
call fcn.00406f20
push ecx
mov eax, esp
mov dword [ebp - 0x828], esp
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 0xb
push ecx
push ebx
push eax
call fcn.00409f60
add esp, 8
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x414]
mov ecx, esp
push eax
call fcn.00406f20
mov ecx, esi
mov byte [ebp - 4], 0xa
call fcn.0040c100
push 0
call fcn.0062403e
int3