Function at 0x531490
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579d8d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 0xc]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
je 0x5317c4
mov ecx, dword [ebp + 0xc]
cmp dword [ecx - 0xc], 0xfc
jle 0x531648
mov eax, dword [0x5dd530]
cmp eax, esi
jne 0x5314f1
xor eax, eax
jmp 0x5314ff
mov edx, dword [0x5dd9a0]
push 0x50020
push edx
call eax
mov ecx, dword [ebp + 0xc]
cmp eax, 0xff1
setne al
push ecx
mov byte [ebp - 0x1c], al
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x5a9978
lea ecx, [ebp - 0x14]
mov esi, eax
call fcn.00401210
lea edx, [ebp - 0x10]
push edx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0052c750
add esp, 4
mov bl, 3
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x53155a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x1c]
push eax
call fcn.00530b80
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004015b0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x53159d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x5315c4
push 0x104
lea ecx, [ebp - 0x10]
call fcn.004019b0
mov edx, dword [ebp - 0x10]
push esi
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 0xc]
call fcn.004015b0
mov edx, dword [ebp + 0xc]
push edx
call edi
test eax, eax
jne 0x531625
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.00401a10
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531838
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x531838
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x531648
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x18]
call fcn.00401210
mov byte [ebp - 4], 5
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.00401a10
lea esi, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 6
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x53169c
push 0x104
lea ecx, [ebp - 0x14]
call fcn.004019b0
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5317ed
cmp eax, dword [esi - 8]
jg 0x5317ed
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
xor ebx, ebx
call fcn.0040c84f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x53174b
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
push esi
lea ecx, [ebp - 0x10]
push str._s__d_
push ecx
mov byte [ebp - 4], 7
call fcn.00401cf0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0xc]
add esp, 0x10
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00401790
mov edi, dword [ebp - 0x10]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x531755
lea eax, [edi - 0x10]
mov byte [ebp - 4], 6
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x531740
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
cmp ebx, 0xf4240
jl 0x5316cc
jmp 0x531781
push 0x80004005
call fcn.004010a0
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 0xc]
call fcn.004015b0
add edi, 0xfffffff0
mov byte [ebp - 4], 6
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x531781
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5317a1
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5317c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x5317f7
cmp eax, dword [esi - 0x10]
jne 0x5317f7
lea edi, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x531830
push 0x80070057
call fcn.004010a0
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x531810
call fcn.00401ae0
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.004ffad4
add esp, 0x10
mov esi, dword [ebp + 8]
add edi, 0x10
mov dword [esi], edi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x53185e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret