Function at 0x4029a0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x540c4b
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x5a3ea8]
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.004069e1
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4029ea
push 0x80004005
call fcn.00401a90
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x214], eax
mov dword [ebp - 4], 0
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00408ae8
mov eax, dword [eax + 8]
push 0x200
lea ecx, [ebp - 0x210]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x210]
lea edx, [ecx + 1]
jmp 0x402a30
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402a30
sub ecx, edx
push ecx
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x214]
call fcn.00404bd0
mov esi, dword [ebp - 0x214]
mov edi, dword [esi - 0xc]
test edi, edi
jns 0x402a63
push 0x80070057
call fcn.00401a90
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x402a86
push edi
lea ecx, [ebp - 0x214]
call fcn.00403fa0
mov esi, dword [ebp - 0x214]
push esi
call fcn.00526ae5
add esp, 4
cmp edi, dword [esi - 8]
jg 0x402a59
mov dword [esi - 0xc], edi
mov byte [edi + esi], 0
cmp dword [esi - 0xc], 0
jg 0x402aa6
or edi, 0xffffffff
jmp 0x402abe
push 0x5c
push esi
call fcn.00526959
mov edi, eax
add esp, 8
test edi, edi
jne 0x402abc
or edi, 0xffffffff
jmp 0x402abe
sub edi, esi
mov ebx, dword [esi - 0xc]
inc edi
test ebx, ebx
jns 0x402ad0
push 0x80070057
call fcn.00401a90
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x402af3
push ebx
lea ecx, [ebp - 0x214]
call fcn.00403fa0
mov esi, dword [ebp - 0x214]
push esi
call fcn.00526ae5
add esp, 4
cmp ebx, dword [esi - 8]
jg 0x402a59
mov dword [esi - 0xc], ebx
mov byte [ebx + esi], 0
mov eax, dword [esi - 0xc]
sub eax, edi
lea edi, [eax + 1]
test edi, edi
jns 0x402b22
push 0x80070057
call fcn.00401a90
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x402b45
push edi
lea ecx, [ebp - 0x214]
call fcn.00403fa0
mov esi, dword [ebp - 0x214]
cmp edi, dword [esi - 8]
jg 0x402a59
mov dword [esi - 0xc], edi
push esi
mov byte [edi + esi], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ebx, dword [esi - 0xc]
push 0
push 0
push ebx
push esi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push 0
mov dword [ebp - 0x218], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
test edi, edi
je 0x402bd6
push dword [ebp - 0x218]
push edi
push ebx
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 0x402bb8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
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.00526d92
mov esp, ebp
pop ebp
ret
call fcn.00404f40
int3