Function at 0x4030c0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51c9bb
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x573c28]
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.0040809e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403108
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x214], eax
mov dword [ebp - 4], 0
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00407ea6
mov eax, dword [eax + 8]
push 0x200
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x210]
lea edx, [eax + 1]
jmp 0x403150
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403150
sub eax, edx
push eax
lea edx, [ebp - 0x210]
push edx
lea ecx, [ebp - 0x214]
call fcn.00401fb0
mov esi, dword [ebp - 0x214]
mov edi, dword [esi - 0xc]
test edi, edi
jns 0x403183
push 0x80070057
call fcn.004010e0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4031a6
push edi
lea ecx, [ebp - 0x214]
call fcn.00401b90
mov esi, dword [ebp - 0x214]
push esi
call fcn.00504a9f
add esp, 4
cmp edi, dword [esi - 8]
jg 0x403179
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
mov eax, dword [esi - 0xc]
test eax, eax
jg 0x4031c7
or ebx, 0xffffffff
jmp 0x4031df
push 0x5c
push esi
call fcn.005049d2
add esp, 8
test eax, eax
jne 0x4031db
or ebx, 0xffffffff
jmp 0x4031df
sub eax, esi
mov ebx, eax
mov edi, dword [esi - 0xc]
inc ebx
test edi, edi
jns 0x4031f1
push 0x80070057
call fcn.004010e0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x403214
push edi
lea ecx, [ebp - 0x214]
call fcn.00401b90
mov esi, dword [ebp - 0x214]
push esi
call fcn.00504a9f
add esp, 4
cmp edi, dword [esi - 8]
jg 0x403179
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
mov edi, dword [esi - 0xc]
sub edi, ebx
inc edi
jns 0x40323f
push 0x80070057
call fcn.004010e0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x403262
push edi
lea ecx, [ebp - 0x214]
call fcn.00401b90
mov esi, dword [ebp - 0x214]
cmp edi, dword [esi - 8]
jg 0x403179
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 - 0x218], eax
test eax, eax
je 0x4032f4
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 0x4032d2
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x218]
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.00504604
mov esp, ebp
pop ebp
ret
call fcn.004018c0
int3