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

Disassembly:
push ebp
lea ebp, [esp - 0x4330]
mov eax, 0x43b0
call fcn.004077b0
mov eax, dword [0x415010]
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 0x4030de
xor eax, eax
jmp 0x4032b9
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.00404caf
pop ecx
pop ecx
test eax, eax
je 0x40311e
lea eax, [ebp + 0x4020]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
jmp 0x4030d7
lea eax, [ebp - 0x40]
push eax
call fcn.00404e48
lea eax, [ebp + 4]
push ebx
push eax
call fcn.00405230
lea eax, [ebp - 0x40]
mov dword [ebp + 0x14], eax
lea eax, [ebp + 4]
push eax
call fcn.0040525d
add esp, 0x10
mov dword [ebp - 0x14], 0x405081
mov dword [ebp - 0x10], 0x405096
mov dword [ebp - 0x30], 0x405081
mov dword [ebp - 0x2c], 0x405096
call fcn.00405016
lea eax, [ebp - 0x80]
push eax
call fcn.004032d1
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.00404c3d
add esp, 0x14
mov dword [ebp], eax
cmp eax, ebx
jne 0x40328b
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 0x40327f
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 0x403263
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.00404e5a
add esp, 0x28
mov dword [ebp], eax
cmp eax, ebx
jne 0x40327f
mov edi, dword [esi + 0x10]
push edi
call fcn.00407990
pop ecx
cmp eax, ebx
jbe 0x40321a
mov esi, dword [esi + 0x10]
lea ecx, [esi + eax - 1]
cmp byte [ecx], 0x2f
je 0x403217
dec eax
dec ecx
cmp eax, ebx
ja 0x40320a
jmp 0x40321a
lea edi, [esi + eax]
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00404cb6
pop ecx
pop ecx
test eax, eax
jne 0x403278
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.00404d3d
add esp, 0xc
test eax, eax
jne 0x403278
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x403278
lea eax, [ebp - 0x20]
push eax
call fcn.00404cbe
pop ecx
test eax, eax
jne 0x403278
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], 0x20
cmp eax, dword [ebp - 0x64]
jb 0x4031a9
jmp 0x40327f
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.004032ed
lea eax, [ebp - 0x38]
push eax
call fcn.00404cbe
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.0040762a
add ebp, 0x4330
leave
ret