Function at 0x5a91e0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x874b80
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x20], edi
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x5a9515
mov eax, dword [edi + 0x2c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
push eax
call esi
test eax, eax
je 0x5a9515
mov eax, dword [ebx]
sub eax, 0x10
push eax
call fcn.004a9b50
add eax, 0x10
add esp, 4
mov dword [esp + 0x18], eax
push 0x5c
push 0x2f
lea ecx, [esp + 0x20]
mov dword [esp + 0x4c], 0
call fcn.004f5730
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.004f6090
call fcn.007cff5d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x5a9281
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x18]
mov eax, dword [edi + 0x2c]
push ebx
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x4c], 1
call fcn.004f58e0
lea ecx, [esp + 0x14]
call fcn.0059f2a0
mov ebp, dword [esp + 0x14]
push ebp
call esi
test eax, eax
je 0x5a943b
xor edi, edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], 0xa
mov byte [esp + 0x44], 2
call fcn.007c9a2f
mov eax, dword [eax + 4]
push edi
push 0x3b
lea ecx, [esp + 0x2c]
push ecx
add eax, 0x42c
push eax
lea edx, [esp + 0x2c]
push edx
call fcn.004b6310
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a9326
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x24]
cmp esi, edi
je 0x5a9429
jmp 0x5a9336
xor edi, edi
xor eax, eax
cmp esi, edi
setne al
cmp eax, edi
je 0x5a9277
mov eax, esi
mov esi, dword [esi]
add eax, 8
push eax
lea ecx, [esp + 0x1c]
call fcn.004aa540
lea eax, [ebp - 0x10]
push eax
call fcn.004a9b50
add eax, 0x10
add esp, 4
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x18]
push ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x48], 3
call fcn.0054f1d0
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x5a93b2
lea eax, [edi - 0x10]
mov byte [esp + 0x44], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a93ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x5a9334
jmp 0x5a9429
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x18]
call fcn.004aa540
mov edx, dword [esp + 0x4c]
mov esi, dword [esp + 0x50]
push edx
mov ecx, esi
call fcn.004aa540
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
lea eax, [edx - 1]
test eax, eax
js 0x5a94c6
cmp eax, edx
jg 0x5a94c6
cmp word [ecx + eax*2], 0x2f
je 0x5a93f8
push 0x2f
mov ecx, esi
call fcn.004d41a0
mov eax, dword [ebx - 0xc]
push eax
push ebx
mov ecx, esi
call fcn.004a9f20
lea eax, [edi - 0x10]
mov byte [esp + 0x44], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a9425
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
lea ecx, [esp + 0x24]
mov byte [esp + 0x44], 1
call fcn.004afe70
mov edi, dword [esp + 0x20]
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5a9440
mov ecx, dword [edi + 0x2c]
sub eax, edx
sar eax, 1
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x5a9455
sub ecx, esi
sar ecx, 1
cmp eax, ecx
jbe 0x5a94d0
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x5a94d0
mov ecx, dword [esp + 0x4c]
push ebp
call fcn.004a8ed0
lea eax, [ebp - 0x10]
mov byte [esp + 0x44], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a949e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov dword [esp + 0x44], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a94c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, 1
jmp 0x5a9517
push 0x80070057
call fcn.004a8210
lea eax, [ebp - 0x10]
mov byte [esp + 0x44], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a94f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov dword [esp + 0x44], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5a9515
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 8