Function at 0x401000
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x4330]
mov eax, 0x43b0
call fcn.0040a570
mov eax, dword [0x424064]
xor eax, ebp
mov dword [ebp + 0x432c], eax
push ebx
mov ebx, dword [ebp + 0x433c]
push esi
push edi
mov edi, dword [ebp + 0x4338]
lea eax, [ebp + 0x4020]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
push ebx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
test eax, eax
jne 0x401053
xor eax, eax
jmp 0x40122e
xor ebx, ebx
push ebx
push ebx
push esi
lea eax, [ebp + 0x4228]
push eax
push 0xffffffffffffffff
push edi
push 0x400
push ebx
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
lea eax, [ebp + 0x4228]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00402c24
pop ecx
pop ecx
test eax, eax
je 0x401093
lea eax, [ebp + 0x4020]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
jmp 0x40104c
lea eax, [ebp - 0x40]
push eax
call fcn.00402dbd
lea eax, [ebp + 4]
push ebx
push eax
call fcn.004031a5
lea eax, [ebp - 0x40]
mov dword [ebp + 0x14], eax
lea eax, [ebp + 4]
push eax
call fcn.004031d2
add esp, 0x10
mov dword [ebp - 0x14], 0x402ff6
mov dword [ebp - 0x10], 0x40300b
mov dword [ebp - 0x30], 0x402ff6
mov dword [ebp - 0x2c], 0x40300b
call fcn.00402f8b
lea eax, [ebp - 0x80]
push eax
call fcn.00401246
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 4]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00402bb2
add esp, 0x14
mov dword [ebp], eax
cmp eax, ebx
jne 0x401200
or dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 8], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x64], ebx
jbe 0x4011f4
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0xc]
lea esi, [ecx + eax]
cmp byte [esi + 0x19], bl
jne 0x4011d8
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
lea eax, [ebp + 4]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00402dcf
add esp, 0x28
mov dword [ebp], eax
cmp eax, ebx
jne 0x4011f4
mov edi, dword [esi + 0x10]
push edi
call fcn.0040e1a0
pop ecx
cmp eax, ebx
jbe 0x40118f
mov esi, dword [esi + 0x10]
lea ecx, [esi + eax - 1]
cmp byte [ecx], 0x2f
je 0x40118c
dec eax
dec ecx
cmp eax, ebx
ja 0x40117f
jmp 0x40118f
lea edi, [esi + eax]
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00402c2b
pop ecx
pop ecx
test eax, eax
jne 0x4011ed
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x28]
add eax, ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00402cb2
add esp, 0xc
test eax, eax
jne 0x4011ed
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x4011ed
lea eax, [ebp - 0x20]
push eax
call fcn.00402c33
pop ecx
test eax, eax
jne 0x4011ed
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], 0x20
cmp eax, dword [ebp - 0x64]
jb 0x40111e
jmp 0x4011f4
mov dword [ebp], 0xb
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push eax
call dword [ebp - 0x10]
pop ecx
pop ecx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00401262
lea eax, [ebp - 0x38]
push eax
call fcn.00402c33
add esp, 0xc
lea eax, [ebp + 0x4020]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
xor eax, eax
cmp dword [ebp], ebx
sete al
mov ecx, dword [ebp + 0x432c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a558
add ebp, 0x4330
leave
ret