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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x638192
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x6cd400]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
push edi
mov eax, dword [0x6cd400]
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 [esp + 0x24], 0
mov dword [esp + 0x28], 0
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 0x4a69c6
cmp word [esp + 0x5c], 0
jne 0x4a678a
xor ecx, ecx
jmp 0x4a67a0
lea ecx, [esp + 0x5c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a6791
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x1c]
call fcn.00403c30
xor eax, eax
push 0xffffffffffffffff
push eax
mov word [esp + 0x4c], ax
lea eax, [esi + 0x34]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], 0
call fcn.00403b10
push 0x68fd1c
lea ecx, [esp + 0x30]
mov byte [esp + 0x27c], 1
call fcn.004035b0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x44]
mov byte [esp + 0x278], 2
call fcn.004aaba0
mov byte [esp + 0x278], 1
cmp dword [esp + 0x40], 8
mov bl, al
jb 0x4a682e
push dword [esp + 0x2c]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], 0
mov word [esp + 0x2c], ax
test bl, bl
je 0x4a6994
lea edx, [esp + 0x44]
lea ecx, [esp + 0x14]
call fcn.004aa9b0
test al, al
je 0x4a6994
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 0x4a6888
mov dword [esi + 0x64], 0xa
jmp 0x4a6994
push 0x68fd2c
lea ecx, [esp + 0x30]
call fcn.004035b0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 3
call fcn.004aaba0
lea ecx, [esp + 0x2c]
mov bl, al
mov byte [esp + 0x278], 1
call fcn.00403680
test bl, bl
je 0x4a68d3
lea ecx, [esp + 0x14]
call fcn.004aa900
test al, al
jne 0x4a6988
lea ecx, [esp + 0x14]
call fcn.004aac50
test al, al
je 0x4a6994
push 0x68fcf4
lea ecx, [esp + 0x30]
call fcn.004035b0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 4
call fcn.004aa9b0
lea ecx, [esp + 0x2c]
mov bl, al
mov byte [esp + 0x278], 1
call fcn.00403680
test bl, bl
je 0x4a6994
lea ecx, [esp + 0x14]
call fcn.004aa900
test al, al
je 0x4a6934
mov dword [esi + 0x64], 0xa
jmp 0x4a6994
lea ecx, [esp + 0x14]
call fcn.004aac50
test al, al
je 0x4a6994
push 0x68fd08
lea ecx, [esp + 0x30]
call fcn.004035b0
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x278], 5
call fcn.004aa9b0
lea ecx, [esp + 0x2c]
mov bl, al
mov byte [esp + 0x278], 1
call fcn.00403680
test bl, bl
je 0x4a6994
lea ecx, [esp + 0x14]
call fcn.004aa900
test al, al
je 0x4a6994
cmp edi, 0x14
jle 0x4a6994
mov dword [esi + 0x64], 0x14
mov byte [esp + 0x278], 0
cmp dword [esp + 0x58], 8
jb 0x4a69af
push dword [esp + 0x44]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
mov dword [esp + 0x278], 0xffffffff
cmp dword [esp + 0x28], 8
jb 0x4a69e4
push dword [esp + 0x14]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], 0
mov word [esp + 0x14], ax
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.005e96ad
mov esp, ebp
pop ebp
ret 4