Function at 0x40beb0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5343b2
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x584cc0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2c], ecx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp + 8]
mov esi, 1
push ecx
lea edx, [ebp - 0x18]
xor ebx, ebx
mov dword [ebp - 4], esi
push edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x1c], ebx
call fcn.00403f60
add esp, 0xc
mov byte [ebp - 4], 2
call fcn.0040fcc4
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40bf20
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
push 0x1c
mov byte [ebp - 4], 3
call fcn.0040f71c
add esp, 4
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 4
cmp eax, ebx
je 0x40bf56
mov ecx, eax
call fcn.0041ed82
mov ebx, eax
mov dword [ebp - 0x20], ebx
jmp 0x40bf59
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
cmp dword [eax - 4], esi
jle 0x40bf74
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x18]
call fcn.00402190
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov esi, eax
test esi, esi
je 0x40c153
mov edx, dword [ebx]
mov eax, dword [edx + 0x40]
push 0
push 0
mov ecx, ebx
call eax
mov esi, eax
test esi, esi
je 0x40c153
cmp dword [ebp - 0x24], 0
je 0x40c147
mov edx, dword [ebx]
mov eax, dword [edx + 0x44]
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov dword [ebp - 0x24], eax
mov eax, dword [edx + 0x3c]
mov ecx, ebx
call eax
test eax, eax
jne 0x40c138
mov edx, dword [ebx]
mov eax, dword [edx + 0x38]
push 0x10
mov ecx, ebx
call eax
test eax, eax
je 0x40c135
mov dword [ebp - 0x1c], 0
mov edx, dword [ebx]
mov edx, dword [edx + 0xc]
lea eax, [ebp - 0x28]
push eax
mov ecx, ebx
call edx
mov byte [ebp - 4], 5
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40c03f
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40c032
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40c032
push eax
call fcn.004020f0
mov edi, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40c02a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add edi, 0x10
mov dword [ebp - 0x14], edi
jmp 0x40c03f
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401ff0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c062
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00403f60
add esp, 8
mov edx, esp
mov byte [ebp - 4], 6
mov dword [ebp - 0x34], esp
push 0x561388
push eax
push edx
call fcn.00404070
mov byte [ebp - 4], 7
mov esi, dword [ebp + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esp, 8
mov dword [ebp - 0x38], esp
mov ebx, esp
call edx
cmp dword [esi - 4], 0
lea edx, [esi - 4]
jl 0x40c0c4
cmp eax, dword [esi - 0x10]
jne 0x40c0c4
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [edx], eax
jmp 0x40c0f1
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x40c142
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.0050f054
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
add edi, 0x10
mov dword [ebx], edi
mov byte [ebp - 4], 6
call fcn.0040beb0
mov esi, eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c127
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x1c]
add dword [ebp - 0x10], ecx
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
jmp 0x40c138
inc dword [ebp - 0x10]
test esi, esi
jne 0x40bf9c
jmp 0x40c153
call fcn.00402180
test esi, esi
je 0x40c153
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
test ebx, ebx
je 0x40c15e
mov ecx, ebx
call fcn.0041ea87
lea eax, [edi - 0x10]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c17e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c1a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c1c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c1ea
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc