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

Disassembly:
push 0xffffffffffffffff
push 0x40bff0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x38]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push eax
mov dword [esp + 0x48], esi
call ebp
cmp eax, 0xffffffff
jne 0x40428f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x4041f2
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
jne 0x4044d0
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x404231
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x404227
and eax, 0xffff
or eax, 0x80070000
cmp eax, esi
jl 0x4044d0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], esi
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov ecx, edi
and ecx, ebx
mov byte [esp + 0x2c], 1
cmp ecx, 0xffffffff
jne 0x4042e1
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call ebp
cmp eax, 0xffffffff
jne 0x404298
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4042a0
and eax, 0xffff
or eax, 0x80070000
jmp 0x40429e
mov dword [esp + 0x10], eax
jmp 0x4041f8
mov dword [esp + 0x38], eax
jmp 0x4042a6
test eax, eax
jne 0x404343
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x40]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x3c], eax
jne 0x4042db
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4042d5
and eax, 0xffff
or eax, 0x80070000
test eax, eax
jl 0x40432c
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov edi, eax
cmp dword [esp + 0x14], edi
jne 0x4044bf
cmp dword [esp + 0x18], ebx
jne 0x4044bf
cmp dword [esp + 0x38], 0xffffffff
jne 0x404361
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call ebp
cmp eax, 0xffffffff
jne 0x40435d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x404396
and eax, 0xffff
or eax, 0x80070000
jmp 0x404394
lea ecx, [esp + 0x38]
call fcn.00404500
lea ecx, [esp + 0x10]
call fcn.00404500
jmp 0x4044e1
lea ecx, [esp + 0x38]
call fcn.00404500
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4044e1
jmp 0x4044d8
mov dword [esp + 0x38], eax
push 0x10000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
xor edi, edi
add esp, 4
cmp ebp, edi
jne 0x4043ba
cmp dword [esp + 0x38], edi
je 0x404385
lea ecx, [esp + 0x38]
call fcn.00404500
cmp dword [esp + 0x10], edi
je 0x4044e1
jmp 0x4044d8
test eax, eax
je 0x404361
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4043a9
lea ecx, [esp + 0x38]
call fcn.00404500
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4044e1
jmp 0x4044d8
mov dword [esp + 0x34], 1
cmp dword [esp + 0x18], edi
ja 0x4043d4
mov ebx, dword [esp + 0x14]
cmp ebx, 0x8000
jb 0x4043d9
mov ebx, 0x8000
mov edx, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x3c]
push edi
push ecx
push ebx
push ebp
push edx
mov dword [esp + 0x50], edi
call esi
test eax, eax
jne 0x404441
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jle 0x40440c
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jne 0x404489
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], edi
push edi
push eax
lea edi, [ebp + 0x8000]
push ebx
push edi
push ecx
call esi
test eax, eax
jne 0x404449
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x404453
and eax, 0xffff
or eax, 0x80070000
jmp 0x404451
cmp dword [esp + 0x3c], ebx
jne 0x404489
jmp 0x40440e
cmp dword [esp + 0x3c], ebx
jne 0x404487
jmp 0x404455
test eax, eax
jne 0x404487
mov ecx, ebx
mov esi, ebp
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x404463
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sub edx, ebx
sbb ecx, 0
cmp ebx, 0x8000
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
jbe 0x40448d
xor edi, edi
jmp 0x4043c2
xor edi, edi
mov dword [esp + 0x34], edi
push ebp
call fcn.0040a920
add esp, 4
lea ecx, [esp + 0x38]
call fcn.00404500
lea ecx, [esp + 0x10]
call fcn.00404500
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4044d0
lea ecx, [esp + 0x38]
call fcn.00404500
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4044e1
lea ecx, [esp + 0x10]
call fcn.00404500
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret