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

Disassembly:
push 0xffffffffffffffff
push 0x4787e3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x390
push ebx
push esi
push edi
mov esi, ecx
mov eax, dword [0x494a28]
xor ebx, ebx
mov dword [esp + 0x3a4], ebx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x3ac]
mov dword [esp + 0x10], ebx
mov byte [esp + 0x3a4], 1
cmp dword [ecx - 8], 2
jg 0x405fb8
push ebx
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x405
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
jmp 0x4064a3
lea edx, [esp + 0x194]
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x194]
push edx
push 0x104
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [esp + 0x3ac]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
call edi
test eax, eax
je 0x406160
mov ecx, dword [0x49a468]
push ecx
push 0x3f5
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov edx, dword [esp + 0x3ac]
mov ecx, esi
push edx
push 0x3f6
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
push ebx
push 0x3ea
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x3eb
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x405
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
lea eax, [esp + 0x194]
push eax
call edi
mov edx, dword [esp + 0x3ac]
lea ecx, [esp + 0x10]
push ecx
push edx
call fcn.004015d0
mov eax, dword [0x49a464]
lea ecx, [esp + 0x14]
push eax
push str._d__s
push ecx
call fcn.00469940
mov edx, dword [esp + 0x20]
add esp, 0x14
mov ecx, esi
push edx
push 0x3ea
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
push ebx
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x405
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push 0x4971a0
push 0x3eb
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov eax, dword [0x49a3dc]
push eax
push 0x3f2
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov ecx, dword [0x49a3cc]
push ecx
push 0x3f3
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov edx, dword [0x49a3cc]
mov ecx, esi
push edx
push 0x3f1
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
push 0x4971a0
push 0x3f4
jmp 0x406495
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x298]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x3ac]
push eax
call fcn.00401ec0
lea ecx, [esp + 0x29c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3b0]
lea edx, [esp + 0x94]
push ecx
push edx
push eax
call fcn.0044d8f0
add esp, 0x10
lea ecx, [esp + 0x90]
push ecx
push 0x3f5
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
lea edx, [esp + 0x298]
mov ecx, esi
push edx
push 0x3f6
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov eax, dword [0x49a464]
mov ecx, dword [esp + 0x10]
push eax
push ecx
lea edx, [esp + 0x14]
push str._d__s
push edx
call fcn.00469940
mov eax, dword [esp + 0x1c]
add esp, 0x10
mov ecx, esi
push eax
push 0x3ea
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
push ebx
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push 0x4971a0
push 0x403
mov ecx, esi
mov dword [esi + 0x104], ebx
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov edx, dword [esp + 0x3ac]
lea ecx, [esp + 0x14]
push ecx
push edx
call fcn.00401ea0
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x40643c
mov eax, dword [0x49a3e0]
mov ecx, esi
push eax
push 0x3eb
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
lea eax, [edi - 5]
cmp eax, 3
ja case.default.0x406290
jmp dword [eax*4 + 0x4064ec]
mov ecx, dword [0x49a45c]
push ecx
push 0x3f4
jmp 0x406448
mov edx, dword [0x49a458]
push ebp
push edx
push 0x3f4
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov eax, dword [0x49a458]
mov ecx, esi
push eax
push 0x3f4
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov ecx, dword [esi + 0xe4]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
push 0x14b
push ecx
call ebp
mov eax, dword [esp + 0x30]
mov edx, eax
shl edx, 0x10
cmp edx, 0x60000
jle 0x40630c
and eax, 0xffff0000
mov dword [esp + 0x30], eax
test eax, 0xffff
je 0x4063b2
push 1
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
mov ecx, dword [esp + 0x30]
xor eax, eax
mov edx, ecx
shl edx, 0x10
test edx, edx
jle 0x406378
lea edi, [eax + 1]
mov eax, dword [0x49a2ec]
push edi
lea ecx, [esp + 0x14]
push eax
push ecx
call fcn.00469940
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0xe4]
add esp, 0xc
push edx
push ebx
push 0x143
push eax
call ebp
mov ecx, dword [esp + 0x30]
mov eax, edi
mov edx, ecx
shl edx, 0x10
sar edx, 0x10
cmp eax, edx
jl 0x40633b
mov eax, ecx
and eax, 0xffff0000
cmp eax, 0x10000
jl 0x4063ac
mov edx, ecx
shl edx, 0x10
cmp eax, edx
jg 0x4063ac
sar ecx, 0x10
lea eax, [ecx - 1]
push eax
push ecx
push 0x48f928
mov dword [esi + 0x104], eax
call section..text
add esp, 0xc
jmp 0x4063b2
mov dword [esi + 0x104], ebx
lea ecx, [esp + 0x10]
call fcn.0046b2a7
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x5c]
push eax
push ecx
lea edx, [esp + 0x18]
push str._s__s
push edx
call fcn.00469940
mov eax, dword [esp + 0x20]
add esp, 0x10
mov ecx, esi
push eax
push 0x403
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
pop ebp
jmp case.default.0x406290
push ebx
push 0x3ee
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x405
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
push ebx
push 0x3e8
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f595
mov ecx, dword [0x49a454]
push ecx
push 0x3f4
jmp 0x406448
mov edx, dword [0x49a3fc]
push edx
push 0x3eb
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov eax, dword [0x49a3dc]
mov ecx, esi
push eax
push 0x3f2
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov ecx, dword [0x49a3cc]
push ecx
push 0x3f3
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
mov edx, dword [0x49a3cc]
push edx
push 0x3f1
mov ecx, esi
call fcn.0046f362
mov ecx, eax
call fcn.0046f452
push ebx
mov ecx, esi
call fcn.0046e9f6
lea ecx, [esp + 0xc]
mov byte [esp + 0x3a4], bl
call fcn.0046b31c
lea ecx, [esp + 0x3ac]
mov dword [esp + 0x3a4], 0xffffffff
call fcn.0046b31c
mov ecx, dword [esp + 0x39c]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x39c
ret 4