Function at 0x58b990
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b27ab
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x616040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or edi, 0xffffffff
lea ebx, [edi + 2]
test eax, eax
je 0x58bd40
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 0xfc
jle 0x58bb89
mov eax, dword [0x621a6c]
test eax, eax
je 0x58ba06
push 0x50020
push dword [0x621ebc]
call eax
push dword [ebp + 8]
cmp eax, 0xff1
setne byte [ebp - 0x20]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x5e9bb0
lea ecx, [ebp - 0x14]
mov esi, eax
call fcn.00402f60
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
call fcn.0058d320
mov byte [ebp - 4], 3
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58ba56
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x20]
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x20]
call fcn.0058cb80
add esp, 4
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004032d0
mov byte [ebp - 4], 3
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58ba94
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x10]
mov edx, ebx
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x58bab9
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00402c20
mov eax, dword [ebp - 0x10]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
lea edx, [ecx - 0x10]
lea esi, [eax - 0x10]
cmp edx, esi
je 0x58bb1e
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x58bb0a
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x58bb0a
push edx
call fcn.00403660
add esp, 4
mov dword [ebp - 0x20], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x58bb02
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [ebp + 8], eax
jmp 0x58bb19
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp + 8]
call fcn.004035a0
mov eax, dword [ebp + 8]
mov ebx, 1
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x58bb69
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.00403660
mov esi, dword [ebp - 0x1c]
add eax, 0x10
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp - 0x10]
mov ecx, edi
add edx, 0xfffffff0
mov dword [esi], eax
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bdc0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x58bdc0
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bb89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
lea ecx, [ebp - 0x18]
call fcn.00402f60
mov byte [ebp - 4], 5
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.00403660
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 6
mov ecx, ebx
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x58bbd9
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push dword [edi - 8]
push edi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x58bd74
cmp eax, dword [edi - 8]
jg 0x58bd74
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
xor ebx, ebx
call fcn.00414e1f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x58bd6a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
push edi
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 7
push str._s__d_
push eax
call fcn.00402d50
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
add esp, 0x10
push dword [eax - 0xc]
push eax
call fcn.00403430
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x58bc86
add esi, 0xfffffff0
mov byte [ebp - 4], 6
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bc7b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
inc ebx
cmp ebx, 0xf4240
jl 0x58bc08
jmp 0x58bd00
mov ecx, dword [ebp + 8]
lea ebx, [esi - 0x10]
add ecx, 0xfffffff0
mov dword [ebp - 0x24], ecx
cmp ebx, ecx
je 0x58bce5
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x20], eax
jl 0x58bcd9
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x58bcd9
push ebx
call fcn.00403660
mov edx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x28], eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x58bcd1
mov esi, dword [ebp - 0x24]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x28]
add eax, 0x10
mov dword [ebp + 8], eax
jmp 0x58bce5
push dword [esi - 0xc]
lea ecx, [ebp + 8]
push esi
call fcn.004035a0
mov byte [ebp - 4], 6
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bd00
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [edi - 0x10]
mov byte [ebp - 4], 5
or edi, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bd20
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58bd40
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi - 4], 0
mov ecx, eax
lea eax, [esi - 4]
jl 0x58bd7e
cmp ecx, dword [esi - 0x10]
jne 0x58bd7e
lea ebx, [esi - 0x10]
mov ecx, 1
lock xadd dword [eax], ecx
inc ecx
jmp 0x58bdb8
push 0x80004005
call fcn.00402740
push 0x80070057
call fcn.00402740
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov ebx, eax
test ebx, ebx
jne 0x58bd92
call fcn.00402c80
mov eax, dword [esi - 0xc]
mov dword [ebx + 4], eax
mov ecx, dword [esi - 0xc]
lea eax, [ecx*2 + 2]
push eax
lea eax, [ecx*2 + 2]
push esi
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.00528cf5
add esp, 0x10
mov esi, dword [ebp - 0x1c]
lea eax, [ebx + 0x10]
mov dword [esi], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x58bde1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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