Function at 0x4027d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov eax, 0x7fffffff
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x3c
mov esi, dword [esp + 0x50]
mov ebp, dword [esp + 0x54]
cmp eax, esi
mov eax, 0
sbb eax, ebp
jb 0x402960
mov ecx, esi
call fcn.004084d0
mov ebx, eax
test eax, eax
je 0x4028b0
mov eax, dword [eax]
test eax, eax
je 0x4028b0
mov eax, 0x7fffffff
cmp eax, esi
mov eax, 0
sbb eax, ebp
jb 0x4028d8
lea eax, [ebx + 8]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [esp + 0x2c], eax
cmp esi, eax
je 0x402857
mov dword [esp], edi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4029e1
mov dword [esp], edi
call sub.msvcrt.dll_fgetc
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sub.msvcrt.dll_ungetc
mov ecx, dword [esp + 0x28]
test ecx, ecx
jns 0x402910
mov eax, dword [esp + 0x2c]
mov ecx, eax
sar ecx, 0x1f
cmp eax, esi
mov edi, ecx
sbb edi, ebp
jge 0x4028a1
test eax, eax
js 0x4029b0
mov edx, dword [esp + 0x2c]
mov ecx, ebx
call fcn.00408790
mov ebx, eax
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0
call fcn.0040a570
mov eax, 0x7fffffff
cmp eax, esi
mov eax, 0
sbb eax, ebp
jae 0x402824
mov dword [esp + 0x10], 0x7fffffff
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp], esi
mov dword [esp + 4], ebp
call fcn.0040b690
jmp 0x402824
mov ecx, edi
call fcn.00402610
mov esi, eax
test eax, eax
je 0x402998
mov edx, dword [eax]
mov ecx, ebx
call fcn.00408ef0
lea ecx, [esi + 8]
mov ebx, eax
mov eax, dword [eax]
lea edx, [ebx + eax + 8]
mov eax, dword [esi]
mov dword [esp + 4], ecx
mov dword [esp], edx
add eax, 1
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi]
add dword [ebx], eax
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 0x10], 0x7fffffff
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp], esi
mov dword [esp + 4], ebp
call fcn.0040b690
jmp 0x4027f5
mov ecx, ebx
xor edx, edx
call fcn.00408ef0
add esp, 0x3c
mov ebx, eax
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 0x10], 0x7fffffff
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040b690
jmp 0x402894
mov ecx, edi
call fcn.00402400
lea esi, [esi]
nop
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x2c
mov dword [esp], 0
call dword [0x4720c4]
cmp ebx, eax
je 0x402a5d
mov dword [esp], ebx
call sub.msvcrt.dll_ftell
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 0x1c], eax
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
call sub.msvcrt.dll_ftell
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], 0
mov dword [esp], ebx
mov ebp, eax
mov edi, eax
mov dword [esp + 4], edx
sar edi, 0x1f
call sub.msvcrt.dll_fseek
xor eax, eax
cmp eax, ebp
sbb eax, edi
jl 0x402a70
add esp, 0x2c
mov ecx, ebx
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00402610
mov dword [esp], ebp
mov ecx, ebx
mov dword [esp + 4], edi
call fcn.004027d0
sub esp, 8
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret