Function at 0x405390
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x550b92
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x59de30]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
push edi
mov eax, dword [0x59de30]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [esi + 0x64], edi
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
mov dword [esp + 0x278], eax
lea eax, [esp + 0x5c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x405645
cmp word [esp + 0x5c], 0
jne 0x40541a
xor ecx, ecx
jmp 0x405430
lea ecx, [esp + 0x5c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405421
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x1c]
call fcn.00403d70
xor eax, eax
push 0xffffffffffffffff
push eax
mov word [esp + 0x4c], ax
lea eax, [esi + 0x34]
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], 0
call fcn.00403f60
mov byte [esp + 0x278], 1
push 6
xor eax, eax
push str..trace
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
call fcn.00403d70
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x44]
mov byte [esp + 0x278], 2
call fcn.0040df40
mov byte [esp + 0x278], 1
cmp dword [esp + 0x40], 8
mov bl, al
jb 0x4054c7
push dword [esp + 0x2c]
call fcn.004daf24
add esp, 4
test bl, bl
je 0x40561b
lea edx, [esp + 0x44]
lea ecx, [esp + 0x14]
call fcn.0040dd50
test al, al
je 0x40561b
cmp dword [esp + 0x28], 8
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x40550a
mov dword [esi + 0x64], 0xa
jmp 0x40561b
push str..debug
lea ecx, [esp + 0x30]
call fcn.00405af0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 3
call fcn.0040df40
lea ecx, [esp + 0x2c]
mov bl, al
mov byte [esp + 0x278], 1
call fcn.00403a50
test bl, bl
je 0x405562
cmp dword [esp + 0x28], 8
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
je 0x40560f
lea ecx, [esp + 0x14]
call fcn.0040dff0
test al, al
je 0x40561b
push str.asu.trace
lea ecx, [esp + 0x30]
call fcn.00405af0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 4
call fcn.0040dd50
lea ecx, [esp + 0x2c]
mov bl, al
mov byte [esp + 0x278], 1
call fcn.00403a50
test bl, bl
je 0x40561b
lea ecx, [esp + 0x14]
call fcn.0040dd30
test al, al
je 0x4055c3
mov dword [esi + 0x64], 0xa
jmp 0x40561b
lea ecx, [esp + 0x14]
call fcn.0040dff0
test al, al
je 0x40561b
push str.asu.debug
lea ecx, [esp + 0x30]
call fcn.00405af0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 5
call fcn.0040dd50
lea ecx, [esp + 0x2c]
mov bl, al
call fcn.00403a50
test bl, bl
je 0x40561b
lea ecx, [esp + 0x14]
call fcn.0040dd30
test al, al
je 0x40561b
cmp edi, 0x14
jle 0x40561b
mov dword [esi + 0x64], 0x14
cmp dword [esp + 0x58], 8
jb 0x40562e
push dword [esp + 0x44]
call fcn.004daf24
add esp, 4
xor eax, eax
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
cmp dword [esp + 0x28], 8
jb 0x405658
push dword [esp + 0x14]
call fcn.004daf24
add esp, 4
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.004da4c1
mov esp, ebp
pop ebp
ret 4