Function at 0x1002fa4c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1028
call fcn.10011e68
mov eax, dword [0x100df7b8]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1014], edi
test edi, edi
je 0x10055699
push ebx
push esi
push edi
call fcn.100d1811
xor ebx, ebx
mov esi, eax
pop ecx
mov dword [ebp - 0x1018], esi
cmp dword [edi + 4], ebx
jl 0x100556b1
push 1
push ebx
push esi
call sym.MSVCR120.dll__lseek
add esp, 0xc
mov dword [ebp - 0x100c], eax
test eax, eax
js 0x1002fc18
mov eax, esi
mov ecx, esi
sar eax, 5
and ecx, 0x1f
shl ecx, 6
mov dword [ebp - 0x1010], eax
mov dword [ebp - 0x1020], ecx
mov edx, dword [eax*4 + sym.MSVCR120.dll___pioinfo]
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x1024], eax
mov dl, byte [ecx + edx + 0x24]
add dl, dl
sar dl, 1
test eax, 0x108
mov eax, dword [ebp - 0x100c]
mov byte [ebp - 0x1005], dl
je 0x1003137a
mov esi, dword [edi]
mov edi, dword [edi + 8]
mov dword [ebp - 0x101c], edi
mov edi, esi
sub edi, dword [ebp - 0x101c]
test byte [ebp - 0x1024], 3
mov dword [ebp - 0x1028], edi
je 0x1002fc06
cmp dl, 1
je 0x100556b9
mov edi, dword [ebp - 0x1010]
mov eax, dword [edi*4 + sym.MSVCR120.dll___pioinfo]
mov edi, dword [ebp - 0x1028]
test byte [ecx + eax + 4], 0x80
mov eax, dword [ebp - 0x100c]
jne 0x10031abe
test eax, eax
je 0x1002fc20
test byte [ebp - 0x1024], 1
jne 0x10031ad7
cmp dl, 1
je 0x1005584e
add eax, edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.1000f7c6
mov esp, ebp
pop ebp
ret
test byte [ebp - 0x1024], 0x80
jne 0x1002fb46
jmp 0x100557d9
or eax, 0xffffffff
jmp 0x1002fb66
mov eax, edi
jmp 0x1002fb66
sub eax, dword [edi + 4]
jmp 0x1002fb66
mov dl, byte [ebp - 0x1005]
jmp 0x1002fb46
mov eax, dword [ebp - 0x100c]
mov edi, ebx
jmp 0x1002fb5b
mov edx, dword [ebp - 0x101c]
cmp edx, esi
jae 0x10031724
cmp byte [edx], 0xa
je 0x10031ad4
inc edx
jmp 0x10031ac4
inc edi
jmp 0x10031ad1
mov eax, dword [ebp - 0x1014]
cmp dword [eax + 4], ebx
je 0x1003172f
mov ebx, dword [ebp - 0x1010]
sub esi, dword [eax + 8]
add esi, dword [eax + 4]
push 0
mov eax, dword [ebx*4 + sym.MSVCR120.dll___pioinfo]
pop ebx
test byte [ecx + eax + 4], 0x80
je 0x10031b73
push 2
push ebx
push dword [ebp - 0x1018]
call sym.MSVCR120.dll__lseek
mov ecx, dword [ebp - 0x100c]
add esp, 0xc
cmp eax, ecx
jne 0x100557e9
mov edx, dword [ebp - 0x1014]
mov eax, dword [edx + 8]
add eax, esi
mov ecx, eax
sub ecx, dword [edx + 8]
cmp eax, dword [edx + 8]
sbb eax, eax
not eax
and eax, ecx
mov dword [ebp - 0x1020], eax
jbe 0x10031b57
mov eax, dword [edx + 8]
mov ecx, dword [ebp - 0x1020]
cmp byte [eax], 0xa
je 0x10031b80
inc eax
inc ebx
cmp ebx, ecx
jb 0x10031b4c
test dword [edx + 0xc], 0x2000
jne 0x10055841
mov dl, byte [ebp - 0x1005]
cmp dl, 1
je 0x10055847
mov eax, dword [ebp - 0x100c]
sub eax, esi
jmp 0x1002fb5b
inc esi
jmp 0x10031b51
call sym.MSVCR120.dll__errno
mov dword [eax], 0x16
call sym.MSVCR120.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x1002fb68
mov dword [edi + 4], ebx
jmp 0x1002fa91
mov edi, dword [ebp - 0x1010]
mov eax, dword [edi*4 + sym.MSVCR120.dll___pioinfo]
mov edi, dword [ebp - 0x1028]
cmp dword [ecx + eax + 0x30], ebx
je 0x1002fb22
mov eax, dword [ebp - 0x1014]
shr edi, 1
cmp dword [eax + 4], ebx
jne 0x100556ee
mov eax, dword [ebp - 0x100c]
jmp 0x1002fb66
mov edx, dword [ebp - 0x1010]
push ebx
mov eax, dword [edx*4 + sym.MSVCR120.dll___pioinfo]
push dword [ecx + eax + 0x2c]
push dword [ecx + eax + 0x28]
push dword [ebp - 0x1018]
call sym.MSVCR120.dll__lseeki64
mov ecx, dword [ebp - 0x1020]
mov esi, eax
mov eax, dword [ebp - 0x1010]
add esp, 0x10
mov eax, dword [eax*4 + sym.MSVCR120.dll___pioinfo]
cmp esi, dword [ecx + eax + 0x28]
jne 0x1002fc18
cmp edx, dword [ecx + eax + 0x2c]
jne 0x1002fc18
push ebx
lea edx, [ebp - 0x101c]
push edx
push 0x1000
lea edx, [ebp - 0x1004]
push edx
push dword [ecx + eax]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x1002fc18
mov ecx, dword [ebp - 0x100c]
push ebx
push ecx
push dword [ebp - 0x1018]
call sym.MSVCR120.dll__lseek
add esp, 0xc
test eax, eax
js 0x1002fc18
mov eax, dword [ebp - 0x101c]
cmp edi, eax
ja 0x1002fc18
lea ecx, [ebp - 0x1004]
test edi, edi
je 0x100557c9
mov edx, ecx
add edx, eax
dec edi
cmp ecx, edx
jae 0x100557c9
mov al, byte [ecx]
cmp al, 0xd
jne 0x100557b8
lea eax, [edx - 1]
cmp ecx, eax
jae 0x100557c4
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x100557c4
mov ecx, eax
jmp 0x100557c4
movzx eax, al
movsx eax, byte [eax + 0x100e1768]
add ecx, eax
inc ecx
test edi, edi
jne 0x1005579a
lea eax, [ebp - 0x1004]
sub esi, eax
lea eax, [esi + ecx]
jmp 0x1002fb66
call sym.MSVCR120.dll__errno
mov dword [eax], 0x16
jmp 0x1002fc18
push ebx
push ecx
push dword [ebp - 0x1018]
call sym.MSVCR120.dll__lseek
add esp, 0xc
test eax, eax
js 0x1002fc18
mov eax, dword [ebp - 0x1014]
mov ecx, 0x200
cmp esi, ecx
ja 0x10055821
test byte [eax + 0xc], 8
je 0x10055821
test dword [eax + 0xc], 0x400
mov esi, ecx
je 0x10055824
mov esi, dword [eax + 0x18]
mov eax, dword [ebp - 0x1010]
mov ecx, dword [ebp - 0x1020]
mov eax, dword [eax*4 + sym.MSVCR120.dll___pioinfo]
test byte [ecx + eax + 4], 4
jmp 0x10031b5e
inc esi
jmp 0x10031b64
shr esi, 1
jmp 0x10031b73
shr edi, 1
jmp 0x1002fb64