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

Disassembly:
push 0xffffffffffffffff
push 0x428c13
mov eax, dword fs:[0]
push eax
sub esp, 0x670
mov eax, dword [0x434284]
xor eax, esp
mov dword [esp + 0x668], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x434284]
xor eax, esp
push eax
lea eax, [esp + 0x684]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x18], edi
mov esi, edx
xor ebx, ebx
push 0x206
lea eax, [esp + 0x47a]
push ebx
mov dword [esp + 0x694], ebx
push eax
mov word [esp + 0x480], bx
call fcn.0041b5e0
add esp, 0xc
lea ecx, [esp + 0x474]
push ecx
push 0x104
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jbe 0x40a2f3
mov eax, dword [esp + 0x698]
mov ebp, 8
cmp dword [esp + 0x6ac], ebp
jae 0x40a085
lea eax, [esp + 0x698]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x206
lea edx, [esp + 0x272]
push ebx
push edx
mov word [esp + 0x278], bx
call fcn.0041b5e0
add esp, 0xc
cmp esi, ebx
je 0x40a0c4
push esi
lea eax, [esp + 0x270]
push 0x104
push eax
call fcn.00417cd3
add esp, 0xc
sub esp, 0x1c
mov esi, esp
lea eax, [esp + 0x288]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
mov dword [esp + 0x38], esp
mov word [esi + 4], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a0e5
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x28c]
push ecx
call fcn.00404580
lea esi, [esp + 0x3c]
call fcn.004129a0
add esp, 0x1c
mov esi, 0x10
mov byte [esp + 0x68c], 1
cmp dword [eax + 0x18], esi
jb 0x40a125
mov eax, dword [eax + 4]
jmp 0x40a128
add eax, 4
cmp dword [edi + 0x18], ebp
jb 0x40a132
mov ecx, dword [edi + 4]
jmp 0x40a135
lea ecx, [edi + 4]
push eax
push ecx
call fcn.00410e10
add esp, 8
mov byte [esp + 0x68c], bl
cmp dword [esp + 0x38], esi
mov ebp, eax
jb 0x40a15b
mov edx, dword [esp + 0x24]
push edx
call fcn.00416abb
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
je 0x40a2f3
xor eax, eax
mov dword [esp + 0x3c], eax
mov word [esp + 0x40], bx
mov dword [esp + 0x268], ebx
cmp dword [ebp], 1
je 0x40a19b
mov edi, 0x80000
mov dword [0x436b00], edi
jmp 0x40a21b
mov esi, dword [ebp + 4]
mov ecx, dword [esi]
or edx, 0xffffffff
cmp dword [ecx + 4], edx
jg 0x40a1af
mov ecx, 0x10000
jmp 0x40a210
cmp dword [esi + 4], edx
je 0x40a1be
mov edi, ecx
call fcn.00410120
or edx, 0xffffffff
mov eax, dword [esi]
mov dword [esi + 4], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], eax
mov word [esp + 0x40], bx
mov dword [esp + 0x248], ebx
mov dword [esp + 0x24c], ebx
mov dword [esp + 0x250], ebx
mov dword [esp + 0x254], ebx
mov dword [esp + 0x258], ebx
mov dword [esp + 0x25c], ebx
mov dword [esp + 0x260], ebx
mov dword [esp + 0x264], ebx
mov dword [esp + 0x268], ebx
xor ecx, ecx
mov dword [0x436b00], ecx
mov edi, 0x80000
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x14], eax
jle 0x40a28b
jmp 0x40a230
mov dword [esp + 0x3c], ebx
mov word [esp + 0x40], bx
mov dword [esp + 0x268], ebx
cmp dword [ebp], 1
je 0x40a24e
mov dword [0x436b00], edi
jmp 0x40a261
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x3c]
push edx
push esi
call fcn.00410330
mov dword [0x436b00], eax
cmp dword [ebp], 1
je 0x40a26f
mov dword [0x436b00], edi
jmp 0x40a282
mov eax, dword [ebp + 4]
push esi
push eax
lea ecx, [esp + 0x48]
call fcn.00410a50
mov dword [0x436b00], eax
add esi, 1
cmp esi, dword [esp + 0x14]
jl 0x40a230
mov eax, dword [ebp]
cmp eax, 1
sete cl
cmp cl, bl
je 0x40a2bd
cmp eax, 1
je 0x40a2a5
mov dword [0x436b00], edi
jmp 0x40a2e9
mov esi, dword [ebp + 4]
call fcn.00410db0
cmp esi, ebx
mov dword [0x436b00], eax
je 0x40a2e0
call fcn.00410ec0
jmp 0x40a2e0
cmp eax, 2
je 0x40a2ca
mov dword [0x436b04], edi
jmp 0x40a2e9
mov esi, dword [ebp + 4]
call fcn.00411690
cmp esi, ebx
mov dword [0x436b04], eax
je 0x40a2e0
call fcn.004117b0
push ebp
call fcn.00416abb
add esp, 4
cmp dword [esp + 0x14], ebx
jg 0x40a30a
mov edi, dword [esp + 0x18]
cmp dword [edi + 0x18], 8
jb 0x40a2fe
mov eax, dword [edi + 4]
jmp 0x40a301
lea eax, [edi + 4]
push eax
call fcn.00417bb8
add esp, 4
lea eax, [esp + 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esp + 0x6ac], 8
jb 0x40a332
mov ecx, dword [esp + 0x698]
push ecx
call fcn.00416abb
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x684]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x668]
xor ecx, esp
call fcn.004170e8
add esp, 0x67c
ret