Function at 0x402310
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51822b
mov eax, dword fs:[0]
push eax
sub esp, 0x40c
mov eax, dword [0x56dbc8]
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
call fcn.00407698
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x402358
push 0x80004005
call fcn.004014c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x414], eax
mov dword [ebp - 4], 0
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.004074cf
mov eax, dword [eax + 8]
push 0x400
lea ecx, [ebp - 0x410]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x410]
lea edx, [eax + 1]
jmp 0x4023a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4023a0
sub eax, edx
push eax
lea edx, [ebp - 0x410]
push edx
lea ecx, [ebp - 0x414]
call fcn.00401c70
mov esi, dword [ebp - 0x414]
mov edi, dword [esi - 0xc]
test edi, edi
jns 0x4023d3
push 0x80070057
call fcn.004014c0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4023f6
push edi
lea ecx, [ebp - 0x414]
call fcn.00401920
mov esi, dword [ebp - 0x414]
push esi
call fcn.0050185a
add esp, 4
cmp edi, dword [esi - 8]
jg 0x4023c9
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
mov eax, dword [esi - 0xc]
test eax, eax
jg 0x402417
or ebx, 0xffffffff
jmp 0x40242f
push 0x5c
push esi
call fcn.0050178d
add esp, 8
test eax, eax
jne 0x40242b
or ebx, 0xffffffff
jmp 0x40242f
sub eax, esi
mov ebx, eax
mov edi, dword [esi - 0xc]
inc ebx
test edi, edi
jns 0x402441
push 0x80070057
call fcn.004014c0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x402464
push edi
lea ecx, [ebp - 0x414]
call fcn.00401920
mov esi, dword [ebp - 0x414]
push esi
call fcn.0050185a
add esp, 4
cmp edi, dword [esi - 8]
jg 0x4023c9
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
mov edi, dword [esi - 0xc]
sub edi, ebx
inc edi
jns 0x40248f
push 0x80070057
call fcn.004014c0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4024b2
push edi
lea ecx, [ebp - 0x414]
call fcn.00401920
mov esi, dword [ebp - 0x414]
cmp edi, dword [esi - 8]
jg 0x4023c9
mov dword [esi - 0xc], edi
push esi
mov byte [edi + esi], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edi, dword [esi - 0xc]
push 0
push 0
push edi
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
push ebx
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebp - 0x418], eax
test eax, eax
je 0x402544
push ebx
push eax
push edi
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402522
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x418]
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.00501491
mov esp, ebp
pop ebp
ret
call fcn.004016e0
int3