Function at 0x4bea10
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e9f38
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x58bd90]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x250]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x14b
push eax
call ebx
call fcn.0041d9cc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4bea6c
push 0x80004005
call fcn.004016a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov ecx, dword [esi + 0x1dc]
push 0
push 0
push 0x147
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x4beaf6
mov edx, dword [esi + 0x1dc]
push 0
push edi
push 0x149
push edx
call ebx
test eax, eax
jns 0x4beaba
push 0x80070057
call fcn.004016a0
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebx - 8]
mov edx, 1
sub edx, dword [ebx - 4]
sub ecx, eax
or ecx, edx
jge 0x4beada
push eax
lea ecx, [ebp - 0x10]
call fcn.00401600
mov ebx, dword [ebp - 0x10]
mov eax, dword [esi + 0x1dc]
push ebx
push edi
push 0x148
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x4beb05
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [esi + 0x1bc]
call fcn.0041af68
mov edi, dword [ebp - 0x10]
mov ecx, 0x54b654
mov eax, edi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4beb36
test dx, dx
je 0x4beb32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4beb36
add eax, 4
add ecx, 4
test dx, dx
jne 0x4beb10
xor eax, eax
jmp 0x4beb3b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x4bebb4
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4bebb4
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
jne 0x4beb61
xor ecx, ecx
jmp 0x4beb75
mov ecx, eax
lea edi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x4beb66
sub ecx, edi
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.004016f0
lea edi, [ebp - 0x10]
call fcn.00405820
push 1
push 0x54b658
mov ecx, edi
call fcn.00402220
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [esi + 0x2dc], ecx
jg 0x4bebf3
mov ecx, dword [esi + 0x250]
push 0
push 0
push 0x14e
push ecx
call ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4bebda
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 0xc]
test ecx, ecx
js 0x4bed16
cmp ecx, dword [esi + 0x2dc]
jge 0x4bed16
lea edi, [ecx*4]
mov ecx, dword [esi + 0x2d8]
push eax
lea edx, [ebp - 0x18]
add ecx, edi
push edx
call fcn.00407070
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
xor edx, edx
test ecx, ecx
setne dl
test edx, edx
je 0x4bea62
mov eax, dword [eax]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4bec66
test dx, dx
je 0x4bec62
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4bec66
add eax, 4
add ecx, 4
test dx, dx
jne 0x4bec40
xor eax, eax
jmp 0x4bec6b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete bl
mov byte [ebp - 4], 1
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 0x4bec93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4becf8
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 0xc]
cmp edx, dword [esi + 0x2dc]
jge 0x4bed16
mov ecx, dword [esi + 0x2d8]
push eax
lea eax, [ebp - 0x1c]
add ecx, edi
push eax
call fcn.00401df0
mov byte [ebp - 4], 4
mov eax, dword [eax]
mov ecx, dword [esi + 0x250]
push eax
push 0
push 0x143
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4becf8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [esi + 0x2dc]
jl 0x4bebf0
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x4beba2
call fcn.0041d34a
int3