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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52358d
mov eax, dword fs:[0]
push eax
sub esp, 0x2b4
mov eax, dword [0x592bb4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x294], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x2c0], 0
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov dword [ebp - 0x298], eax
cmp dword [ebp - 0x298], 0x104
ja 0x40442d
cmp dword [ebp - 0x298], 0
jne 0x404460
push 0x5810d7
mov ecx, dword [ebp + 8]
call fcn.00407770
mov ecx, dword [ebp - 0x294]
or ecx, 1
mov dword [ebp - 0x294], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00407540
mov eax, dword [ebp + 8]
jmp 0x4046f5
lea ecx, [ebp - 0x248]
call fcn.00407850
mov byte [ebp - 4], 1
mov dword [ebp - 0x29c], 1
mov edx, dword [ebp - 0x298]
add edx, 1
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x114]
push ecx
call fcn.004fec10
add esp, 0xc
push 0x581218
lea ecx, [ebp - 0x230]
call fcn.00407770
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x29c]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.00403230
add esp, 8
mov dword [ebp - 0x2a4], eax
mov ecx, dword [ebp - 0x2a4]
mov dword [ebp - 0x2a8], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2a8]
push edx
lea ecx, [ebp - 0x230]
call fcn.00407490
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x260]
call fcn.00407540
lea ecx, [ebp + 0xc]
call fcn.00407140
movzx eax, al
test eax, eax
je 0x40454c
push str..tmp
lea ecx, [ebp - 0x290]
call fcn.00407770
mov dword [ebp - 0x2ac], eax
mov ecx, dword [ebp - 0x2ac]
mov dword [ebp - 0x2b0], ecx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x294]
or edx, 2
mov dword [ebp - 0x294], edx
mov eax, dword [ebp - 0x2b0]
mov dword [ebp - 0x2a0], eax
jmp 0x404598
lea ecx, [ebp + 0xc]
push ecx
push 0x581230
lea edx, [ebp - 0x278]
push edx
call fcn.0040e0b0
add esp, 0xc
mov dword [ebp - 0x2b4], eax
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x2b8], eax
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x294]
or ecx, 4
mov dword [ebp - 0x294], ecx
mov edx, dword [ebp - 0x2b8]
mov dword [ebp - 0x2a0], edx
mov eax, dword [ebp - 0x2a0]
mov dword [ebp - 0x2bc], eax
mov ecx, dword [ebp - 0x2bc]
push ecx
lea ecx, [ebp - 0x230]
call fcn.00407490
mov dword [ebp - 4], 4
mov edx, dword [ebp - 0x294]
and edx, 4
je 0x4045da
and dword [ebp - 0x294], 0xfffffffb
lea ecx, [ebp - 0x278]
call fcn.00407540
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x294]
and eax, 2
je 0x4045fe
and dword [ebp - 0x294], 0xfffffffd
lea ecx, [ebp - 0x290]
call fcn.00407540
lea ecx, [ebp - 0x230]
call fcn.004071b0
push eax
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
test eax, eax
jne 0x40466c
push 0x5810e2
mov ecx, dword [ebp + 8]
call fcn.00407770
mov edx, dword [ebp - 0x294]
or edx, 1
mov dword [ebp - 0x294], edx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.00407540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x248]
call fcn.00407540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00407540
mov eax, dword [ebp + 8]
jmp 0x4046f5
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x248]
call fcn.004074b0
mov ecx, dword [ebp - 0x29c]
add ecx, 1
mov dword [ebp - 0x29c], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.00407540
lea ecx, [ebp - 0x248]
call fcn.004071b0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404479
lea edx, [ebp - 0x248]
push edx
mov ecx, dword [ebp + 8]
call fcn.00407680
mov eax, dword [ebp - 0x294]
or eax, 1
mov dword [ebp - 0x294], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x248]
call fcn.00407540
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00407540
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e6445
mov esp, ebp
pop ebp
ret