Function at 0x5132b0
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 0x53660c
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x878
mov eax, dword [0x5c6150]
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 0x5133aa
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 0x513340
sub ecx, dword [ebp - 0x888]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x850]
call fcn.00413520
lea ecx, [ebp - 0x850]
call fcn.00513e30
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 0x5133aa
shr eax, 4
mov byte [ebp - 0x879], 1
and al, 1
jne 0x5133b1
mov byte [ebp - 0x879], 0
test byte [ebp - 0x884], 1
je 0x5133c5
lea ecx, [ebp - 0x850]
call fcn.004134c0
cmp byte [ebp - 0x879], 0
je 0x5136f5
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 0x513407
sub ecx, dword [ebp - 0x880]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x850]
call fcn.00413520
lea ecx, [ebp - 0x850]
call fcn.00513e30
push 1
push 0x597154
lea ecx, [ebp - 0x850]
mov dword [ebp - 4], 2
call fcn.0042c750
push 4
push 0x5986e0
lea ecx, [ebp - 0x850]
call fcn.0042c750
lea ecx, [ebp - 0x850]
call fcn.00513e30
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 0x51348f
shr eax, 4
and al, 1
jne 0x51349a
lea ecx, [ebp - 0x850]
call fcn.00513120
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.004d9fe0
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.00448050
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004d9fe0
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 0x51362f
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513562
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00413520
mov ecx, esi
call fcn.00513e30
test edi, edi
je 0x5135b5
cmp word [edi], 0
je 0x5135b5
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513596
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, esi
call fcn.0042c750
mov ecx, esi
call fcn.00513e30
cmp word [ebp - 0x428], 0
je 0x5135f5
lea edx, [ebp - 0x428]
lea ecx, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x5135d0
sub edx, ecx
lea eax, [ebp - 0x428]
sar edx, 1
mov ecx, esi
push edx
push eax
call fcn.0042c750
mov ecx, esi
call fcn.00513e30
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x878]
call fcn.00514350
lea ecx, [ebp - 0x878]
call fcn.00513d60
lea ecx, [ebp - 0x878]
call fcn.004134c0
lea ecx, [ebp - 0x850]
call fcn.004134c0
mov al, 1
jmp 0x5138f0
test edi, edi
je 0x513677
cmp word [edi], 0
je 0x513677
push 1
push 0x597154
lea ecx, [ebp - 0x850]
call fcn.0042c750
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513650
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x850]
call fcn.0042c750
lea ecx, [ebp - 0x850]
call fcn.00513e30
cmp word [ebp - 0x428], 0
je 0x5136bd
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513690
sub ecx, edx
lea eax, [ebp - 0x428]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x850]
call fcn.0042c750
lea ecx, [ebp - 0x850]
call fcn.00513e30
lea eax, [ebp - 0x850]
cmp esi, eax
je 0x5136e3
cmp dword [ebp - 0x83c], 8
mov ecx, esi
push dword [ebp - 0x840]
cmovae eax, dword [ebp - 0x850]
push eax
call fcn.00413520
lea ecx, [ebp - 0x850]
call fcn.004134c0
mov al, 1
jmp 0x5138f0
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.004d9fe0
add esp, 0xc
lea eax, [ebp - 0x838]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x5138ee
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.004d9fe0
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.00448050
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.004d9fe0
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 0x513878
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5137e0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00413520
mov ecx, esi
call fcn.00513e30
test edi, edi
je 0x513811
push edi
mov ecx, esi
call fcn.00513f60
cmp word [ebp - 0x630], 0
je 0x513849
lea ecx, [ebp - 0x630]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513824
sub ecx, edx
lea eax, [ebp - 0x630]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.0042c750
mov ecx, esi
call fcn.00513e30
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x878]
call fcn.00514350
lea ecx, [ebp - 0x878]
call fcn.00513d60
lea ecx, [ebp - 0x878]
call fcn.004134c0
mov al, 1
jmp 0x5138f0
lea ecx, [ebp - 0x838]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513881
sub ecx, edx
lea eax, [ebp - 0x838]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00413520
mov ecx, esi
call fcn.00513e30
test edi, edi
je 0x5138b2
push edi
mov ecx, esi
call fcn.005141d0
cmp word [ebp - 0x630], 0
je 0x5138ea
lea ecx, [ebp - 0x630]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5138c5
sub ecx, edx
lea eax, [ebp - 0x630]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.0042c750
mov ecx, esi
call fcn.00513e30
mov al, 1
jmp 0x5138f0
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.004d6cfd
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret