Function at 0x1017eaa
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edx
cmp esi, eax
jne 0x1017ee1
call fcn.0100f603
and dword [eax], 0
call fcn.0100f5eb
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x1018454
push edi
xor edi, edi
cmp esi, edi
jl 0x1017ef0
cmp esi, dword [0x102398c]
jb 0x1017f17
call fcn.0100f603
mov dword [eax], edi
call fcn.0100f5eb
push edi
push edi
push edi
push edi
push edi
mov dword [eax], 9
call fcn.0100f594
add esp, 0x14
or eax, 0xffffffff
jmp 0x1018453
mov eax, esi
and esi, 0x1f
imul esi, esi, 0x24
sar eax, 5
push ebx
lea ebx, [eax*4 + 0x10239a0]
mov eax, dword [ebx]
add eax, esi
mov dword [ebp - 0x18], eax
mov cl, byte [eax + 4]
test cl, 1
jne 0x1017f50
call fcn.0100f603
mov dword [eax], edi
call fcn.0100f5eb
mov dword [eax], 9
jmp 0x1018095
mov dword [ebp - 0xc], edi
cmp edx, edi
je 0x1018450
test cl, 2
jne 0x1018450
cmp dword [ebp + 0xc], edi
je 0x1018083
mov eax, dword [eax + 8]
and eax, 3
mov dword [ebp - 0x1c], eax
dec eax
push 4
pop ecx
je 0x101807b
dec eax
jne 0x1017f95
mov eax, edx
not eax
test al, 1
je 0x1018083
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp - 0x18]
test byte [ecx + 4], 0x48
mov eax, edi
je 0x1018020
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x1018020
cmp dword [ebp + 0x10], 0
je 0x1018020
dec dword [ebp + 0x10]
cmp dword [ebp - 0x1c], 0
mov byte [edi], cl
mov ecx, dword [ebx]
lea eax, [edi + 1]
mov dword [ebp - 0xc], 1
mov byte [esi + ecx + 5], 0xa
je 0x1018020
mov ecx, dword [ebx]
mov cl, byte [esi + ecx + 6]
cmp cl, 0xa
je 0x1018020
cmp dword [ebp + 0x10], 0
je 0x1018020
mov byte [eax], cl
mov ecx, dword [ebx]
inc eax
dec dword [ebp + 0x10]
cmp dword [ebp - 0x1c], 1
mov dword [ebp - 0xc], 2
mov byte [esi + ecx + 6], 0xa
jne 0x1018020
mov ecx, dword [ebx]
mov cl, byte [esi + ecx + 7]
cmp cl, 0xa
je 0x1018020
cmp dword [ebp + 0x10], 0
je 0x1018020
mov byte [eax], cl
mov ecx, dword [ebx]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0xc], 3
mov byte [esi + ecx + 7], 0xa
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [ebx]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101841a
mov ecx, dword [ebp - 0x18]
test ecx, ecx
js 0x101841a
cmp ecx, dword [ebp + 0x10]
ja 0x101841a
mov eax, dword [ebx]
add dword [ebp - 0xc], ecx
lea eax, [esi + eax + 4]
test byte [eax], 0x80
je 0x10182c1
cmp dword [ebp - 0x1c], 2
je 0x10182e4
test ecx, ecx
je 0x10180e6
cmp byte [edi], 0xa
jne 0x10180e6
or byte [eax], 4
jmp 0x10180e9
mov eax, edx
not eax
test al, 1
jne 0x10180a4
call fcn.0100f603
mov dword [eax], edi
call fcn.0100f5eb
mov dword [eax], 0x16
push edi
push edi
push edi
push edi
push edi
call fcn.0100f594
add esp, 0x14
jmp 0x10180de
mov eax, edx
shr eax, 1
mov dword [ebp + 0x10], ecx
cmp eax, ecx
jb 0x10180b2
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.0100c9b9
mov edi, eax
pop ecx
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x1017f9b
call fcn.0100f5eb
mov dword [eax], 0xc
call fcn.0100f603
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x1018452
and byte [eax], 0xfb
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, edi
mov dword [ebp + 0x10], edi
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x10181d0
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x10181bb
cmp al, 0xd
je 0x101811c
mov byte [edi], al
inc edi
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x10181ad
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x101813c
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x1018137
add ecx, 2
mov dword [ebp + 0x10], ecx
mov byte [edi], 0xa
jmp 0x10181ac
mov dword [ebp + 0x10], eax
jmp 0x10181a9
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1018164
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10181a9
cmp dword [ebp - 0x18], 0
je 0x10181a9
mov eax, dword [ebx]
test byte [esi + eax + 4], 0x48
je 0x1018187
cmp byte [ebp - 1], 0xa
je 0x1018132
mov byte [edi], 0xd
mov eax, dword [ebx]
mov cl, byte [ebp - 1]
mov byte [esi + eax + 5], cl
jmp 0x10181ac
cmp edi, dword [ebp - 0x10]
jne 0x1018192
cmp byte [ebp - 1], 0xa
je 0x1018132
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0101896c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10181ad
mov byte [edi], 0xd
inc edi
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x10180ff
jmp 0x10181d0
mov eax, dword [ebx]
lea eax, [esi + eax + 4]
test byte [eax], 0x40
jne 0x10181cb
or byte [eax], 2
jmp 0x10181d0
mov al, byte [ecx]
mov byte [edi], al
inc edi
mov eax, edi
sub eax, dword [ebp - 0x10]
cmp dword [ebp - 0x1c], 1
mov dword [ebp - 0xc], eax
jne 0x10182c1
test eax, eax
je 0x10182c1
dec edi
mov cl, byte [edi]
test cl, cl
js 0x10181f7
inc edi
jmp 0x1018280
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x101820e
cmp eax, 4
jg 0x1018217
cmp edi, dword [ebp - 0x10]
jb 0x1018217
dec edi
movzx ecx, byte [edi]
inc eax
cmp byte [ecx + 0x1021d20], 0
je 0x10181ff
mov dl, byte [edi]
movzx ecx, dl
movsx ecx, byte [ecx + 0x1021d20]
test ecx, ecx
jne 0x1018237
call fcn.0100f5eb
mov dword [eax], 0x2a
jmp 0x10182bd
inc ecx
cmp ecx, eax
jne 0x1018240
add edi, eax
jmp 0x1018280
mov ecx, dword [ebx]
test byte [ecx + esi + 4], 0x48
je 0x101826e
inc edi
mov byte [ecx + esi + 5], dl
cmp eax, 2
jl 0x101825c
mov dl, byte [edi]
mov ecx, dword [ebx]
mov byte [esi + ecx + 6], dl
inc edi
cmp eax, 3
jne 0x101826a
mov dl, byte [edi]
mov ecx, dword [ebx]
mov byte [esi + ecx + 7], dl
inc edi
sub edi, eax
jmp 0x1018280
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.0101896c
add esp, 0x10
mov eax, dword [ebp - 0x20]
sub edi, dword [ebp - 0x10]
shr eax, 1
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
push edi
push dword [ebp - 0x10]
push 0
push 0xfde9
call dword [0x1022044]
test eax, eax
je 0x10182b0
add eax, eax
cmp eax, dword [ebp - 0x20]
ja 0x10182b0
mov dword [ebp - 0xc], eax
jmp 0x10182c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100f61b
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
je 0x10182d0
push eax
call fcn.0100c8d2
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x1018452
mov eax, dword [ebp - 0xc]
jmp 0x1018452
test ecx, ecx
je 0x10182f3
cmp word [edi], 0xa
jne 0x10182f3
or byte [eax], 4
jmp 0x10182f6
and byte [eax], 0xfb
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, edi
mov dword [ebp - 0xc], eax
dec eax
mov dword [ebp + 0x10], edi
cmp edi, eax
jae 0x101840f
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x10183f6
cmp ecx, 0xd
je 0x1018332
mov word [edi], cx
add edi, 2
add eax, 2
mov dword [ebp + 0x10], eax
jmp 0x10183e7
mov ecx, dword [ebp - 0xc]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x101835a
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x1018352
add eax, 4
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x10183e0
mov dword [ebp + 0x10], ecx
jmp 0x10183de
add dword [ebp + 0x10], 2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [ebx]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1018383
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10183de
cmp dword [ebp - 0x18], 0
je 0x10183de
mov eax, dword [ebx]
test byte [esi + eax + 4], 0x48
je 0x10183ba
cmp word [ebp - 8], 0xa
je 0x101834b
push 0xd
pop eax
mov word [edi], ax
mov eax, dword [ebx]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 5], cl
mov eax, dword [ebx]
mov cl, byte [ebp - 7]
mov byte [esi + eax + 6], cl
mov eax, dword [ebx]
mov byte [esi + eax + 7], 0xa
jmp 0x10183e4
cmp edi, dword [ebp - 0x10]
jne 0x10183c6
cmp word [ebp - 8], 0xa
je 0x101834b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0101896c
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x10183e7
push 0xd
pop eax
mov word [edi], ax
add edi, 2
mov eax, dword [ebp - 0xc]
dec eax
cmp dword [ebp + 0x10], eax
jb 0x101830d
jmp 0x101840f
mov ecx, dword [ebx]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x1018406
or byte [esi], 2
jmp 0x101840f
mov ax, word [eax]
mov word [edi], ax
add edi, 2
sub edi, dword [ebp - 0x10]
mov dword [ebp - 0xc], edi
jmp 0x10182c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x101843e
call fcn.0100f5eb
mov dword [eax], 9
call fcn.0100f603
mov dword [eax], esi
jmp 0x10182bd
cmp eax, 0x6d
jne 0x10182b6
and dword [ebp - 0x14], 0
jmp 0x10182c1
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret