Function at 0x10029e9c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1028
call fcn.10015c75
mov eax, dword [0x100de7b8]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1014], edi
test edi, edi
je 0x10052010
push ebx
push esi
push edi
call fcn.1008ca36
xor ebx, ebx
mov esi, eax
pop ecx
mov dword [ebp - 0x1018], esi
cmp dword [edi + 4], ebx
jl 0x10052028
push 1
push ebx
push esi
call sym.MSVCR120.dll__lseek
add esp, 0xc
mov dword [ebp - 0x100c], eax
test eax, eax
js 0x10030913
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 0x1002c5a8
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 0x10030901
cmp dl, 1
je 0x10052030
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 0x1002cd6e
test eax, eax
je 0x1003091b
test byte [ebp - 0x1024], 1
jne 0x1002cd87
cmp dl, 1
je 0x100521c5
add eax, edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.10010cbc
mov esp, ebp
pop ebp
ret
sub eax, dword [edi + 4]
jmp 0x10029fb6
mov dl, byte [ebp - 0x1005]
jmp 0x10029f96
mov eax, dword [ebp - 0x100c]
mov edi, ebx
jmp 0x10029fab
mov edx, dword [ebp - 0x101c]
cmp edx, esi
jae 0x1002c95c
cmp byte [edx], 0xa
je 0x1002cd84
inc edx
jmp 0x1002cd74
inc edi
jmp 0x1002cd81
mov eax, dword [ebp - 0x1014]
cmp dword [eax + 4], ebx
je 0x1002c967
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 0x1002ce23
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 0x10052160
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 0x1002ce07
mov eax, dword [edx + 8]
mov ecx, dword [ebp - 0x1020]
cmp byte [eax], 0xa
je 0x1002ce30
inc eax
inc ebx
cmp ebx, ecx
jb 0x1002cdfc
test dword [edx + 0xc], 0x2000
jne 0x100521b8
mov dl, byte [ebp - 0x1005]
cmp dl, 1
je 0x100521be
mov eax, dword [ebp - 0x100c]
sub eax, esi
jmp 0x10029fab
inc esi
jmp 0x1002ce01
test byte [ebp - 0x1024], 0x80
jne 0x10029f96
jmp 0x10052150
or eax, 0xffffffff
jmp 0x10029fb6
mov eax, edi
jmp 0x10029fb6
call sym.MSVCR120.dll__errno
mov dword [eax], 0x16
call sym.MSVCR120.dll__invalid_parameter_noinfo
or eax, 0xffffffff
jmp 0x10029fb8
mov dword [edi + 4], ebx
jmp 0x10029ee1
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 0x10029f72
mov eax, dword [ebp - 0x1014]
shr edi, 1
cmp dword [eax + 4], ebx
jne 0x10052065
mov eax, dword [ebp - 0x100c]
jmp 0x10029fb6
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 0x10030913
cmp edx, dword [ecx + eax + 0x2c]
jne 0x10030913
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 0x10030913
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 0x10030913
mov eax, dword [ebp - 0x101c]
cmp edi, eax
ja 0x10030913
lea ecx, [ebp - 0x1004]
test edi, edi
je 0x10052140
mov edx, ecx
add edx, eax
dec edi
cmp ecx, edx
jae 0x10052140
mov al, byte [ecx]
cmp al, 0xd
jne 0x1005212f
lea eax, [edx - 1]
cmp ecx, eax
jae 0x1005213b
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x1005213b
mov ecx, eax
jmp 0x1005213b
movzx eax, al
movsx eax, byte [eax + 0x100e0748]
add ecx, eax
inc ecx
test edi, edi
jne 0x10052111
lea eax, [ebp - 0x1004]
sub esi, eax
lea eax, [esi + ecx]
jmp 0x10029fb6
call sym.MSVCR120.dll__errno
mov dword [eax], 0x16
jmp 0x10030913
push ebx
push ecx
push dword [ebp - 0x1018]
call sym.MSVCR120.dll__lseek
add esp, 0xc
test eax, eax
js 0x10030913
mov eax, dword [ebp - 0x1014]
mov ecx, 0x200
cmp esi, ecx
ja 0x10052198
test byte [eax + 0xc], 8
je 0x10052198
test dword [eax + 0xc], 0x400
mov esi, ecx
je 0x1005219b
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 0x1002ce0e
inc esi
jmp 0x1002ce14
shr esi, 1
jmp 0x1002ce23
shr edi, 1
jmp 0x10029fb4