Function at 0x40f080
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x698154
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x75f140]
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 - 0x828], ecx
lea eax, [ebp - 0x818]
mov dword [ebp - 0x820], esi
push eax
mov dword [ebp - 0x81c], esi
mov dword [ebp - 4], 0
call fcn.00407f60
add esp, 4
lea ebx, [esi + 0x720]
mov byte [ebp - 4], 1
push eax
mov ecx, ebx
mov dword [ebp - 0x824], ebx
call fcn.0040b610
mov edx, dword [ebp - 0x818]
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 0x40f1fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f1fb
mov eax, dword [ebx]
mov dword [ebp - 4], 0xffffffff
cmp dword [eax - 4], 1
jle 0x40f214
push dword [eax - 0xc]
mov ecx, ebx
call fcn.00402aa0
mov edx, dword [ebx]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x81c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f221
sub ecx, dword [ebp - 0x81c]
cmp byte [ecx + edx - 1], 0x5c
je 0x40f27d
push 0x6c1a10
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.0040b610
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 0x40f27d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x6c1027
push dword [ebx]
call fcn.00657b21
add esp, 8
test eax, eax
je 0x40f4eb
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.0042a586
mov ecx, eax
test ecx, ecx
je 0x40f505
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.00402960
test al, al
jne 0x40f30c
lea ecx, [ebp - 0x414]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f2f0
sub ecx, edx
lea eax, [ebp - 0x414]
push ecx
push eax
lea ecx, [ebp - 0x820]
call fcn.00403730
lea eax, [ebp - 0x414]
mov dword [ebp - 4], 7
push eax
call fcn.0040eba0
add esp, 4
mov esi, eax
call fcn.0042a586
mov ecx, eax
test ecx, ecx
je 0x40f50f
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.00402960
test al, al
jne 0x40f378
test esi, esi
jne 0x40f35d
xor ecx, ecx
jmp 0x40f36b
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f362
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x818]
call fcn.00403730
mov edi, dword [ebp - 0x818]
lea ecx, [ebp - 0x820]
push 0x6c1027
push edi
mov byte [ebp - 4], 9
call fcn.00413600
mov esi, dword [ebp - 0x820]
test esi, esi
je 0x40f4e1
push esi
push dword [ebx]
call fcn.0065a911
add esp, 8
test eax, eax
je 0x40f40f
call fcn.0042a586
mov ecx, eax
test ecx, ecx
je 0x40f4e1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x824], eax
push dword [ebx]
lea eax, [ebp - 0x824]
mov byte [ebp - 4], 0xa
push str.______________________________n_r_s_n_r___________
push eax
call fcn.00402b50
mov edi, dword [ebp - 0x828]
add esp, 0xc
mov ecx, edi
push 0x24
push 0x6c209c
push dword [ebp - 0x824]
call fcn.0042f07f
cmp eax, 7
jne 0x40f520
jmp 0x40f519
push ecx
lea eax, [edi - 0x10]
mov dword [ebp - 0x82c], esp
mov ebx, esp
mov dword [ebp - 0x81c], 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
mov dword [ebp - 0x834], 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.0040b6e0
mov ecx, dword [ebp - 0x828]
add esp, 0xc
mov byte [ebp - 4], 9
call fcn.0040da90
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 0x40f4a9
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 0x40f4c5
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.00609c1d
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402130
push 0
push 0x6c2034
push 0x6c214c
mov ecx, esi
call fcn.0042f07f
push 0
call fcn.006695a3
push 0x80004005
call fcn.00402130
push 0x80004005
call fcn.00402130
push 0
call fcn.006695a3
push ecx
mov ecx, esp
mov dword [ebp - 0x81c], esp
push 0x6c1027
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.0040b6e0
add esp, 8
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x414]
mov ecx, esp
push eax
call fcn.00406f20
mov ecx, edi
mov byte [ebp - 4], 0xa
call fcn.0040df30
push 0
call fcn.006695a3
int3