Function at 0x4011f0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, 1
push edi
xor edi, edi
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x28], edi
lea eax, [esi - 1]
mov dword [ebp - 0x24], 0xffffffff
cmp eax, 0xffff
ja 0x40146d
push edi
push edi
push 3
push edi
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x401427
lea ecx, [ebp - 0x30]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x401427
mov eax, dword [ebp - 0x30]
or eax, dword [ebp - 0x2c]
je 0x401427
lea eax, [esi + 0x10000]
push eax
call fcn.00406d70
mov edi, eax
add esp, 4
mov dword [ebp - 4], edi
test edi, edi
je 0x401427
mov edi, dword [ebp + 0x14]
mov ecx, edi
mov esi, dword [ebp + 0x18]
or ecx, esi
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 8], esi
je 0x40129d
cmp esi, ecx
jg 0x40129d
jl 0x4012a4
cmp edi, eax
jbe 0x4012a4
mov edi, eax
mov dword [ebp - 8], ecx
mov esi, ecx
mov ecx, dword [ebp + 0x1c]
mov eax, ecx
mov edx, dword [ebp + 0x20]
or eax, edx
je 0x4012cb
mov eax, edi
sub eax, ecx
mov ecx, esi
mov dword [ebp - 0x10], eax
sbb ecx, edx
mov dword [ebp - 0x14], ecx
js 0x4012cb
jg 0x4012c6
test eax, eax
je 0x4012cb
mov edx, dword [ebp - 0x14]
jmp 0x4012e0
xorps xmm0, xmm0
movlpd qword [ebp - 0x1c], xmm0
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
nop
mov ecx, edi
sub ecx, eax
sbb esi, edx
mov dword [ebp - 0x18], esi
js 0x4012fc
jg 0x4012f5
cmp ecx, 0x10000
jbe 0x4012fc
mov esi, 0x10000
jmp 0x401301
mov esi, edi
sub esi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub edi, esi
mov dword [ebp - 0x18], edi
sbb eax, 0
mov dword [ebp - 8], eax
test ebx, ebx
jne 0x401328
push dword [ebp + 0x10]
mov eax, dword [ebp - 4]
push eax
add eax, esi
push eax
call fcn.004048f0
mov eax, dword [ebp - 8]
add esp, 0xc
push 0
lea ecx, [ebp - 0x38]
push ecx
push eax
push edi
mov edi, dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x401417
push 0
lea eax, [ebp - 0x28]
push eax
push esi
mov esi, dword [ebp - 4]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401417
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x40140f
mov ecx, dword [ebp + 0x10]
test ebx, ebx
je 0x401372
sub edi, ecx
jmp 0x401373
dec edi
test edi, edi
js 0x4013d2
mov eax, dword [ebp + 0xc]
lea edx, [edi + esi]
mov esi, ecx
sub esi, 4
jb 0x401395
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x40139a
add edx, 4
add eax, 4
sub esi, 4
jae 0x401384
cmp esi, 0xfffffffc
je 0x4013ef
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x4013c7
cmp esi, 0xfffffffd
je 0x4013ef
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x4013c7
cmp esi, 0xfffffffe
je 0x4013ef
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x4013c7
cmp esi, 0xffffffff
je 0x4013ef
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x4013ef
sub edi, 1
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
jns 0x401377
mov esi, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
cmp esi, edx
jl 0x401417
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
jg 0x4013e8
cmp edi, eax
jbe 0x401417
xor ebx, ebx
jmp 0x4012e0
xor eax, eax
mov ebx, edi
add ebx, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
adc eax, dword [ebp - 8]
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 4]
mov esi, eax
mov eax, dword [ebp - 0xc]
jmp 0x401445
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 4]
mov esi, eax
mov eax, dword [ebp - 0xc]
jmp 0x401445
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x20], 0xffffffff
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], 0xffffffff
cmp eax, 0xffffffff
je 0x40144c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40147d
push edi
call fcn.00406d6b
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret