Function at 0x50f5b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x582513
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x5fc150]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x230], ebx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x22c], edi
mov dword [ebp - 4], 0
test esi, esi
jne 0x50f616
push eax
call fcn.005117b0
mov esi, eax
test esi, esi
je 0x50f7b1
mov ecx, dword [ebp + 0x18]
sub ecx, dword [ebp + 0x14]
sub ecx, 0x18
cmp ecx, 0x18
jae 0x50f7c3
cmp dword [edi + 0x14], 8
jb 0x50f632
mov eax, dword [edi]
jmp 0x50f634
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x50f7b1
push dword [ebp + 0x14]
mov ecx, ebx
push esi
call fcn.005108b0
test eax, eax
jne 0x50f7b1
cmp dword [edi + 0x14], 8
jb 0x50f65e
mov edi, dword [edi]
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
push 0x34
test eax, eax
je 0x50f6fc
call fcn.0052bd3f
mov edi, eax
add esp, 4
mov dword [ebp - 0x224], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x50f6c6
push 1
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x22c], esp
push dword [ebp + 0x14]
call fcn.00402970
mov byte [ebp - 4], 2
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x228], esp
push 0x5883b8
call fcn.004029a0
mov byte [ebp - 4], 3
mov byte [ebp - 4], 1
mov ecx, edi
call fcn.0050e8f0
jmp 0x50f6c8
xor eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebx + 0xc0]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
call fcn.00514e20
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x14], 8
jb 0x50f6ef
mov eax, dword [eax]
push dword [ebp - 0x220]
push 3
jmp 0x50f784
call fcn.0052bd3f
mov edi, eax
add esp, 4
mov dword [ebp - 0x224], edi
mov byte [ebp - 4], 4
test edi, edi
je 0x50f753
push 0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x22c], esp
push dword [ebp + 0x14]
call fcn.00402970
mov byte [ebp - 4], 5
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x228], esp
push 0x5883b8
call fcn.004029a0
mov byte [ebp - 4], 6
mov byte [ebp - 4], 4
mov ecx, edi
call fcn.0050e8f0
jmp 0x50f755
xor eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebx + 0xc0]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
call fcn.00514e20
mov eax, dword [ebp + 0x14]
cmp dword [eax + 0x14], 8
jb 0x50f77c
mov eax, dword [eax]
push dword [ebp - 0x220]
push 4
push esi
lea edi, [ebx + 0x68]
push eax
mov ecx, edi
call fcn.004f76b0
push 0
push 0x510240
push esi
mov ecx, edi
call fcn.004f7940
mov byte [ebp - 0x219], 1
mov al, byte [ebp - 0x219]
jmp 0x50f8aa
mov byte [ebp - 0x219], 0
mov al, byte [ebp - 0x219]
jmp 0x50f8aa
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 4
push 0x110a
push dword [ebx + 0x74]
call esi
mov dword [ebp - 0x220], eax
test eax, eax
je 0x50f8a2
mov dword [ebp - 0x254], eax
lea ecx, [ebp - 0x218]
lea eax, [ebp - 0x258]
mov dword [ebp - 0x258], 1
push eax
push 0
push 0x113e
push dword [ebx + 0x74]
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], 0x104
call esi
mov esi, dword [ebp - 0x248]
cmp word [esi], 0
jne 0x50f82d
xor eax, eax
jmp 0x50f841
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x50f832
sub eax, edx
sar eax, 1
mov ebx, dword [ebp + 0x14]
cmp dword [ebx + 0x14], 8
jb 0x50f84e
mov edx, dword [ebx]
jmp 0x50f850
mov edx, ebx
mov ecx, dword [ebx + 0x10]
mov edi, ecx
cmp ecx, eax
jb 0x50f85b
mov edi, eax
test edi, edi
jne 0x50f900
xor ecx, ecx
test ecx, ecx
jne 0x50f876
mov ecx, dword [ebx + 0x10]
cmp ecx, eax
jb 0x50f876
jbe 0x50f927
push dword [ebp - 0x220]
mov ebx, dword [ebp - 0x230]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0x110a
push dword [ebx + 0x74]
call esi
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x50f7e4
xor al, al
mov byte [ebp - 0x219], al
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x50f9f9
push dword [ebp - 0x224]
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x18]
push ecx
call fcn.00401f90
mov ecx, dword [ebp + 0x1c]
mov eax, 0x2aaaaaab
mov ebx, dword [ebp + 0x14]
add esp, 0x10
sub ecx, ebx
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0xaaaaaaa
jbe 0x50f99a
call fcn.00547c01
jmp 0x50f900
mov cx, word [edx]
cmp cx, word [esi]
jne 0x50f916
add edx, 2
add esi, 2
sub edi, 1
jmp 0x50f85d
movzx ecx, word [edx]
cmp cx, word [esi]
sbb ecx, ecx
and ecx, 0xfffffffe
inc ecx
jmp 0x50f865
mov byte [ebp - 0x228], 0
lea eax, [ebx + 0x18]
push dword [ebp - 0x228]
push ebx
push dword [ebp + 0x18]
push eax
call fcn.0044de30
mov eax, dword [ebp + 0x18]
lea edx, [ebp + 0x14]
push dword [ebp - 0x224]
push edx
lea ecx, [eax - 0x18]
push eax
push ecx
call fcn.00401f90
sub dword [ebp + 0x18], 0x18
lea eax, [ebp + 0x14]
add esp, 0x14
mov ecx, esp
mov dword [ebp - 0x228], esp
push eax
call fcn.0044edf0
mov byte [ebp - 4], 7
push dword [ebp - 0x220]
push dword [ebp - 0x22c]
push dword [ebp - 0x224]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x230]
call fcn.0050f5b0
jmp 0x50f8a4
lea eax, [eax + eax*2]
shl eax, 3
cmp eax, 0x1000
jb 0x50f9d5
test bl, 0x1f
je 0x50f9b1
call fcn.00547c01
mov eax, dword [ebx - 4]
cmp eax, ebx
jb 0x50f9bd
call fcn.00547c01
sub ebx, eax
cmp ebx, 4
jae 0x50f9c9
call fcn.00547c01
cmp ebx, 0x23
jbe 0x50f9d3
call fcn.00547c01
mov ebx, eax
push ebx
call fcn.0052bd72
mov al, byte [ebp - 0x219]
add esp, 4
mov dword [ebp + 0x14], 0
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052c233
mov esp, ebp
pop ebp
ret 0x18