Function at 0x403560
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424b85
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x4304f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.004115e0
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4035d4
lea ecx, [ebp - 0x218]
push 0x5c
push ecx
call fcn.00413885
add esp, 8
test eax, eax
je 0x4035c7
xor edx, edx
mov word [eax], dx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x28
call fcn.00413b9c
add esp, 4
mov dword [ebp - 0x228], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x4035f7
push eax
call fcn.00404de0
jmp 0x4035f9
xor eax, eax
lea ecx, [ebp - 0x224]
or esi, 0xffffffff
mov dword [ebp - 4], esi
push ecx
mov dword [edi + 4], eax
call fcn.004044d0
push 1
mov dword [ebp - 4], 1
mov edx, dword [edi + 4]
push eax
push edx
call fcn.00404fd0
mov bl, al
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403647
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4037a6
lea ecx, [ebp - 0x22c]
push ecx
mov ecx, 0x429534
call fcn.00401310
push 0
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x220]
mov dword [ebp - 4], 2
mov ecx, dword [edi + 4]
push eax
push ecx
call fcn.00405ab0
mov ebx, 4
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4036a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x220]
cmp dword [ecx - 0xc], 0
je 0x4036d1
lea edx, [ebp - 0x220]
push edx
mov eax, ebx
xor ecx, ecx
call fcn.00402590
lea eax, [ebp - 0x220]
push eax
call fcn.00404260
lea ecx, [ebp - 0x224]
push ecx
mov ecx, str.register
call fcn.00401310
lea edx, [ebp - 0x219]
push edx
lea ecx, [ebp - 0x224]
push ecx
mov byte [ebp - 4], 5
mov eax, dword [edi + 4]
lea edx, [ebp - 0x228]
push edx
push eax
mov byte [ebp - 0x219], 0
call fcn.00405ab0
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40372c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403750
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x219], 0
je 0x403784
call fcn.00403d10
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jg 0x403780
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x403802
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jg 0x4037a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [edi + 4]
call fcn.004053a0
lea ecx, [ebp - 0x228]
push ecx
call fcn.004044d0
push 0
mov dword [ebp - 4], 6
mov edx, dword [edi + 4]
push eax
push edx
call fcn.00404fd0
test al, al
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x228]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4037fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
test bl, bl
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00413430
mov esp, ebp
pop ebp
ret