Function at 0x40a9c0
Capabilities:
Set current directory
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x44f590
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x46b9d8]
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x14]
mov ebx, ecx
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], 0
call fcn.00405ee0
add esp, 4
lea ecx, [ebx + 0x4e4]
push eax
mov byte [ebp - 4], 1
call fcn.00405310
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa47
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
jmp 0x40aaaa
mov eax, dword [ebx + 0x4e4]
lea esi, [ebx + 0x4e4]
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x40aaca
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.00402cc0
mov edx, dword [esi]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40aad1
sub eax, edi
cmp byte [eax + edx - 1], 0x5c
je 0x40ab2a
push 0x454a74
lea edx, [ebp - 0x14]
push esi
push edx
call fcn.004053d0
add esp, 0xc
push eax
mov ecx, esi
mov dword [ebp - 4], 4
call fcn.00405310
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab2a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi]
push 0x4541f2
push eax
call fcn.004383b9
add esp, 8
test eax, eax
sete al
test al, al
je 0x40ab5d
push 0
push 0x454b78
push 0x454b60
mov ecx, ebx
call fcn.00415c92
push 0
call fcn.00439667
push 0x400
lea ecx, [ebp + 0x400]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp + 0x400]
push edx
lea ecx, [ebp - 0x20]
call fcn.00405510
lea eax, [ebp + 0x400]
push eax
mov dword [ebp - 4], 5
call fcn.00407360
add esp, 4
push eax
lea ecx, [ebp - 0x18]
call fcn.00405510
mov ecx, dword [ebp - 0x18]
push 0x4541f2
push ecx
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 6
call fcn.00408130
mov edx, dword [ebp - 0x20]
mov eax, dword [esi]
push edx
push eax
call fcn.00438e26
add esp, 8
test eax, eax
je 0x40ac79
call fcn.0041b4c9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40abe5
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [esi]
push ecx
lea edx, [ebp - 0x1c]
push 0x454b08
push edx
mov byte [ebp - 4], 7
call fcn.004086b0
mov eax, dword [ebp - 0x1c]
add esp, 0xc
push 0x24
push 0x454afc
push eax
mov ecx, ebx
call fcn.00415c92
cmp eax, 7
jne 0x40ac2a
push 0
call fcn.00439667
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push 0x4541f2
call fcn.00405510
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
lea edx, [ebp - 0x18]
push edx
push esi
push ecx
mov byte [ebp - 4], 8
call fcn.004089c0
add esp, 8
lea eax, [ebp + 0x400]
mov ecx, esp
mov dword [ebp - 0x24], esp
push eax
mov byte [ebp - 4], 9
call fcn.00405510
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00407d90
push 0
call fcn.00439667
mov eax, dword [ebp - 0x18]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x24], esp
mov edi, esp
push eax
call fcn.00404ff0
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi]
sub eax, 0x10
mov dword [ebp - 0x28], esp
mov edi, esp
push eax
mov byte [ebp - 4], 0xa
call fcn.00404ff0
add eax, 0x10
mov dword [edi], eax
mov ecx, esp
mov dword [ebp - 0x14], esp
lea edx, [ebp - 0x18]
push edx
push esi
push ecx
mov byte [ebp - 4], 0xb
call fcn.004089c0
add esp, 0xc
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00409380
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40acf7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.00437a5c
add ebp, 0x804
mov esp, ebp
pop ebp
ret