Function at 0x40cbb0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66a564
mov eax, dword fs:[0]
push eax
sub esp, 0x828
mov eax, dword [0x71cf78]
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 + 0x720]
mov byte [ebp - 4], 1
call fcn.00409f70
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 0x40cd0b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40cd0b
mov edx, dword [esi + 0x720]
lea ebx, [esi + 0x720]
mov dword [ebp - 4], 0xffffffff
cmp dword [edx - 4], 1
jle 0x40cd30
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 0x40cd40
sub ecx, dword [ebp - 0x81c]
cmp byte [edx + ecx - 1], 0x5c
je 0x40cd9c
push 0x690b6c
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.00409f70
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 0x40cd9c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x68ffcf
push dword [ebx]
call fcn.0062c66c
add esp, 8
test eax, eax
je 0x40d011
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.00423b74
mov ecx, eax
test ecx, ecx
je 0x40d02b
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 0x40ce2c
lea ecx, [ebp - 0x414]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ce10
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.0040c7c0
add esp, 4
mov esi, eax
call fcn.00423b74
mov ecx, eax
test ecx, ecx
je 0x40d035
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 0x40ce98
test esi, esi
jne 0x40ce7d
xor ecx, ecx
jmp 0x40ce8b
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ce82
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x818]
call fcn.00408780
mov edi, dword [ebp - 0x818]
lea ecx, [ebp - 0x820]
push 0x68ffcf
push edi
mov byte [ebp - 4], 9
call fcn.00410930
mov esi, dword [ebp - 0x820]
test esi, esi
je 0x40d007
push esi
push dword [ebx]
call fcn.0062f4e6
add esp, 8
test eax, eax
je 0x40cf2f
call fcn.00423b74
mov ecx, eax
test ecx, ecx
je 0x40d007
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 0x6910f0
push eax
call fcn.00402b10
mov esi, dword [ebp - 0x824]
add esp, 0xc
mov ecx, esi
push 0x24
push 0x691148
push dword [ebp - 0x81c]
call fcn.004285c0
cmp eax, 7
jne 0x40d046
jmp 0x40d03f
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, 0x720
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.00409fe0
mov ecx, dword [ebp - 0x824]
add esp, 0xc
mov byte [ebp - 4], 9
call fcn.0040bde0
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 0x40cfcf
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 0x40cfeb
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.006027d7
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004020e0
push 0
push 0x6910d0
push 0x6910d8
mov ecx, esi
call fcn.004285c0
push 0
call fcn.0062ced5
push 0x80004005
call fcn.004020e0
push 0x80004005
call fcn.004020e0
push 0
call fcn.0062ced5
push ecx
mov ecx, esp
mov dword [ebp - 0x824], esp
push 0x68ffcf
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.00409fe0
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.0040c280
push 0
call fcn.0062ced5
int3