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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fd1fc
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x878
mov eax, dword [0x57b070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x880], edx
mov esi, ecx
mov edi, dword [ebx + 8]
mov dword [ebp - 0x884], 0
test edx, edx
je 0x4cfd6a
xor eax, eax
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 7
mov word [ebp - 0x850], ax
mov ecx, edx
mov dword [ebp - 4], eax
lea eax, [ecx + 2]
mov dword [ebp - 0x888], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cfd00
sub ecx, dword [ebp - 0x888]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x850]
call fcn.00418a60
lea ecx, [ebp - 0x850]
call fcn.004d4830
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x850]
cmp dword [ebp - 0x83c], 8
mov dword [ebp - 0x884], 1
cmovae eax, dword [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4cfd6a
shr eax, 4
mov byte [ebp - 0x879], 1
and al, 1
jne 0x4cfd71
mov byte [ebp - 0x879], 0
test byte [ebp - 0x884], 1
je 0x4cfd85
lea ecx, [ebp - 0x850]
call fcn.00418a00
cmp byte [ebp - 0x879], 0
je 0x4d00b5
xor eax, eax
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 7
mov word [ebp - 0x850], ax
mov edx, dword [ebp - 0x880]
mov ecx, edx
mov dword [ebp - 4], 1
lea eax, [ecx + 2]
mov dword [ebp - 0x880], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cfdc7
sub ecx, dword [ebp - 0x880]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x850]
call fcn.00418a60
lea ecx, [ebp - 0x850]
call fcn.004d4830
push 1
push 0x5528b0
lea ecx, [ebp - 0x850]
mov dword [ebp - 4], 2
call fcn.004442e0
push 4
push str.Temp
lea ecx, [ebp - 0x850]
call fcn.004442e0
lea ecx, [ebp - 0x850]
call fcn.004d4830
cmp dword [ebp - 0x83c], 8
lea eax, [ebp - 0x850]
cmovae eax, dword [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4cfe4f
shr eax, 4
and al, 1
jne 0x4cfe5a
lea ecx, [ebp - 0x850]
call fcn.004cef90
lea eax, [ebp - 0x860]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x860], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 0x208
lea eax, [ebp - 0x428]
push 0
push eax
call fcn.004a64e0
movzx eax, word [ebp - 0x852]
add esp, 0xc
push eax
movzx eax, word [ebp - 0x854]
push eax
movzx eax, word [ebp - 0x856]
push eax
movzx eax, word [ebp - 0x858]
push eax
movzx eax, word [ebp - 0x85a]
push eax
movzx eax, word [ebp - 0x85e]
push eax
movzx eax, word [ebp - 0x860]
push eax
push str._04d_02d_02d_02d_02d_02d_03d
lea eax, [ebp - 0x428]
push 0x104
push eax
call fcn.00441820
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004a64e0
add esp, 0x34
lea ecx, [ebp - 0x220]
cmp dword [ebp - 0x83c], 8
lea eax, [ebp - 0x850]
cmovae eax, dword [ebp - 0x850]
push ecx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4cffef
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cff22
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00418a60
mov ecx, esi
call fcn.004d4830
test edi, edi
je 0x4cff75
cmp word [edi], 0
je 0x4cff75
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4cff56
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, esi
call fcn.004442e0
mov ecx, esi
call fcn.004d4830
cmp word [ebp - 0x428], 0
je 0x4cffb5
lea edx, [ebp - 0x428]
lea ecx, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4cff90
sub edx, ecx
lea eax, [ebp - 0x428]
sar edx, 1
mov ecx, esi
push edx
push eax
call fcn.004442e0
mov ecx, esi
call fcn.004d4830
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x878]
call fcn.004d4d30
lea ecx, [ebp - 0x878]
call fcn.004d0840
lea ecx, [ebp - 0x878]
call fcn.00418a00
lea ecx, [ebp - 0x850]
call fcn.00418a00
mov al, 1
jmp 0x4d02b0
test edi, edi
je 0x4d0037
cmp word [edi], 0
je 0x4d0037
push 1
push 0x5528b0
lea ecx, [ebp - 0x850]
call fcn.004442e0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d0010
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x850]
call fcn.004442e0
lea ecx, [ebp - 0x850]
call fcn.004d4830
cmp word [ebp - 0x428], 0
je 0x4d007d
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d0050
sub ecx, edx
lea eax, [ebp - 0x428]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x850]
call fcn.004442e0
lea ecx, [ebp - 0x850]
call fcn.004d4830
lea eax, [ebp - 0x850]
cmp esi, eax
je 0x4d00a3
cmp dword [ebp - 0x83c], 8
mov ecx, esi
push dword [ebp - 0x840]
cmovae eax, dword [ebp - 0x850]
push eax
call fcn.00418a60
lea ecx, [ebp - 0x850]
call fcn.00418a00
mov al, 1
jmp 0x4d02b0
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.004a64e0
add esp, 0xc
lea eax, [ebp - 0x838]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4d02ae
lea eax, [ebp - 0x860]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x860], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 0x208
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.004a64e0
movzx eax, word [ebp - 0x852]
add esp, 0xc
push eax
movzx eax, word [ebp - 0x854]
push eax
movzx eax, word [ebp - 0x856]
push eax
movzx eax, word [ebp - 0x858]
push eax
movzx eax, word [ebp - 0x85a]
push eax
movzx eax, word [ebp - 0x85e]
push eax
movzx eax, word [ebp - 0x860]
push eax
push str._04d_02d_02d_02d_02d_02d_03d
lea eax, [ebp - 0x630]
push 0x104
push eax
call fcn.00441820
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004a64e0
add esp, 0x34
lea eax, [ebp - 0x220]
push eax
push 0
push 0
lea eax, [ebp - 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x4d0238
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d01a0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00418a60
mov ecx, esi
call fcn.004d4830
test edi, edi
je 0x4d01d1
push edi
mov ecx, esi
call fcn.004d4a60
cmp word [ebp - 0x630], 0
je 0x4d0209
lea ecx, [ebp - 0x630]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d01e4
sub ecx, edx
lea eax, [ebp - 0x630]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004442e0
mov ecx, esi
call fcn.004d4830
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x878]
call fcn.004d4d30
lea ecx, [ebp - 0x878]
call fcn.004d0840
lea ecx, [ebp - 0x878]
call fcn.00418a00
mov al, 1
jmp 0x4d02b0
lea ecx, [ebp - 0x838]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d0241
sub ecx, edx
lea eax, [ebp - 0x838]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00418a60
mov ecx, esi
call fcn.004d4830
test edi, edi
je 0x4d0272
push edi
mov ecx, esi
call fcn.004d4bd0
cmp word [ebp - 0x630], 0
je 0x4d02aa
lea ecx, [ebp - 0x630]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d0285
sub ecx, edx
lea eax, [ebp - 0x630]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004442e0
mov ecx, esi
call fcn.004d4830
mov al, 1
jmp 0x4d02b0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a35cb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret