Function at 0x42c960
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5738
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4e64ec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x44], eax
cmp dword [eax], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x3c], esi
je 0x42cbf5
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x42cbf5
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42cbf5
push dword [esi]
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x24], xmm0
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov ecx, dword [0x4e8b14]
mov esi, eax
test cl, 1
jne 0x42ca18
or ecx, 1
mov dword [0x4e8b14], ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x4b9800
mov dword [0x4e8b08], 0x4bb654
mov dword [0x4e8b0c], eax
mov byte [0x4e8b10], 0
call fcn.0045b8f2
mov ecx, dword [0x4e8b14]
add esp, 4
test cl, 2
jne 0x42ca76
or ecx, 2
mov dword [0x4e8b18], 0x4bb66c
xor eax, eax
mov dword [0x4e8b14], ecx
push 0x4b9830
mov dword [0x4e8b1c], 0x4e8b08
mov dword [0x4e8b2c], 2
mov dword [0x4e8b24], 0
mov dword [0x4e8b28], 0
mov dword [0x4e8b30], eax
mov dword [0x4e8b20], 0x4e8b18
call fcn.0045b8f2
add esp, 4
mov eax, dword [0x4e8b18]
mov ecx, 0x4e8b18
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0
test esi, esi
je 0x42caac
test esi, 0xffff0000
jne 0x42caac
movzx eax, si
lea ecx, [ebp - 0x38]
push eax
call fcn.0040a8d0
jmp 0x42cab5
push esi
lea ecx, [ebp - 0x38]
call fcn.00417fc0
mov esi, dword [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
test esi, esi
jne 0x42cac8
mov dword [ebp - 0x40], esi
jmp 0x42cb0b
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42cad0
sub ecx, edx
sar ecx, 1
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jle 0x42caf3
mov dword [ebp - 0x40], 0
jmp 0x42cb0b
add edi, edi
mov eax, edi
call fcn.0045bdf0
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.0042b930
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
push 0x4bf778
push dword [eax]
call fcn.0048f7dc
mov edi, eax
add esp, 8
mov dword [ebp - 0x3c], edi
test edi, edi
je 0x42cb84
push 2
push 0
push edi
call fcn.0048ff27
push edi
call fcn.0049054f
push 0
push 0
push edi
mov dword [ebp - 0x38], eax
call fcn.0048ff27
push dword [ebp - 0x38]
call fcn.0048052f
mov edi, eax
add esp, 0x20
test edi, edi
je 0x42cb84
push dword [ebp - 0x3c]
push dword [ebp - 0x38]
push 1
push edi
call fcn.0048fa8c
add esp, 0x10
cmp eax, dword [ebp - 0x38]
je 0x42cba2
push edi
call fcn.0046b978
push dword [ebp - 0x3c]
call fcn.0048f0e4
add esp, 8
push edi
call fcn.0046b978
add esp, 4
xor edi, edi
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x42cb9e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
jmp 0x42cbf7
push dword [ebp - 0x3c]
call fcn.0048f0e4
push 9
push 8
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x44]
push dword [ebp - 0x40]
push dword [eax]
call fcn.00402020
add esp, 0x2c
test eax, eax
jne 0x42cb7b
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x44]
push edi
push dword [eax]
call fcn.00402060
add esp, 0xc
test eax, eax
jne 0x42cb7b
push edi
call fcn.0046b978
add esp, 4
mov edi, 1
jmp 0x42cb86
xor eax, eax
lea esp, [ebp - 0x50]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045b907
mov esp, ebp
pop ebp
ret 4