Function at 0x1017db60
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x20], 0
xor ebp, ebp
mov dword [esp + 0x24], 0
xor ebx, ebx
mov dword [esp + 0x28], 0
mov dword [esp + 0xc], 0
mov eax, dword [esi + 0x83d64]
test eax, eax
je 0x1017dbb1
push 2
push ebx
push 0x80
push dword [esi + 0x83d68]
call eax
add esp, 0x10
test eax, eax
jne 0x1017dead
push edi
push 0x103f020c
push dword [esp + 0x38]
call fcn.102771b0
mov edi, eax
add esp, 8
mov dword [esp + 0x34], edi
test edi, edi
jne 0x1017dbe1
or dword [esi + 0xf34], 0x200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push edi
call fcn.10280656
add esp, 4
cmp eax, 0x50
jne 0x1017de9a
push edi
call fcn.10280656
add esp, 4
cmp eax, 0x35
jne 0x1017de9a
jmp 0x1017dc10
mov edi, dword [esp + 0x34]
nop dword [eax + eax]
cmp ebx, 3
jge 0x1017dcac
push edi
call fcn.10280656
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x1017dca3
cmp edi, 0x23
jne 0x1017dc38
mov dword [esp + 0x10], 1
jmp 0x1017dc07
cmp edi, 0xa
jne 0x1017dc47
mov dword [esp + 0x10], 0
jmp 0x1017dc4e
cmp dword [esp + 0x10], 0
jne 0x1017dc07
push edi
call fcn.10271d82
add esp, 4
test eax, eax
je 0x1017dc62
mov ebp, 1
jmp 0x1017dc66
test ebp, ebp
je 0x1017dc07
push edi
call fcn.10271d82
add esp, 4
test eax, eax
je 0x1017dc86
mov eax, dword [esp + ebx*4 + 0x24]
lea eax, [eax + eax*4]
lea eax, [eax - 0x18]
lea eax, [edi + eax*2]
mov dword [esp + ebx*4 + 0x24], eax
jmp 0x1017dc07
push edi
call fcn.10271ddc
mov edi, dword [esp + 0x38]
add esp, 4
test eax, eax
je 0x1017de9a
xor ebp, ebp
inc ebx
jmp 0x1017dc10
cmp ebx, 3
jl 0x1017de96
movzx ecx, word [esi + 0x16]
cmp dword [esp + 0x24], ecx
jne 0x1017de76
movzx eax, word [esi + 0x14]
cmp dword [esp + 0x28], eax
jne 0x1017de76
cmp dword [esp + 0x2c], 0xffff
jne 0x1017de76
push 2
push ecx
mov ecx, esi
call fcn.10168cb0
mov edi, eax
mov ecx, esi
push str.subtract__
push edi
mov dword [esp + 0x1c], edi
call fcn.10168d40
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x10], ebx
cmp ax, word [esi + 0x14]
jae 0x1017de21
push dword [esp + 0x34]
movzx eax, word [esi + 0x16]
push eax
push 2
push edi
call fcn.10276e89
xor eax, eax
add esp, 0x10
xor ebp, ebp
cmp ax, word [esi + 0x16]
jae 0x1017de10
mov eax, ebx
and eax, 7
lea ecx, [eax + eax]
mov dword [esp + 0x20], ecx
mov edi, dword [esi + 0x194]
mov eax, ebp
and eax, 1
or eax, ecx
add eax, eax
mov ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
shr edi, cl
and edi, 3
movzx eax, word [eax + ebp*2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [esi + 0x5483c]
movzx edx, ax
movzx eax, word [esi + 0x1e]
sar ebx, cl
imul ebx, eax
mov eax, ebp
sar eax, cl
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], ecx
add ebx, eax
shl ebx, 2
lea eax, [ebx + edi]
movzx eax, word [ecx + eax*2]
sub eax, edx
test eax, eax
jle 0x1017dddc
mov eax, dword [esp + 0x14]
mov edi, dword [esi + 0x194]
mov ecx, dword [esp + 0x18]
shr edi, cl
movzx eax, word [eax + ebp*2]
and edi, 3
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [esi + 0x5483c]
mov ebx, dword [esp + 0x10]
movzx edx, ax
movzx eax, word [esi + 0x1e]
sar ebx, cl
imul ebx, eax
mov eax, ebp
sar eax, cl
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], ecx
add ebx, eax
shl ebx, 2
lea eax, [ebx + edi]
movzx edi, word [ecx + eax*2]
sub edi, edx
jmp 0x1017ddde
xor edi, edi
mov eax, dword [esi + 0x194]
inc ebp
mov ecx, dword [esp + 0x18]
shr eax, cl
mov ecx, dword [esp + 0x1c]
and eax, 3
add eax, ebx
mov ebx, dword [esp + 0x10]
mov word [ecx + eax*2], di
movzx eax, word [esi + 0x16]
mov ecx, dword [esp + 0x20]
cmp ebp, eax
jl 0x1017dd33
mov edi, dword [esp + 0x14]
movzx eax, word [esi + 0x14]
inc ebx
mov dword [esp + 0x10], ebx
cmp ebx, eax
jl 0x1017dd05
push edi
mov ecx, esi
call fcn.10168d30
push dword [esp + 0x34]
call fcn.10277284
push 0x4018
lea eax, [esi + 0x20f38]
push 0
push eax
call fcn.1026e960
mov eax, dword [esi + 0x83d64]
add esp, 0x10
mov dword [esi + 0x24f50], 0
test eax, eax
je 0x1017dea3
push 2
push 1
push 0x80
push dword [esi + 0x83d68]
call eax
add esp, 0x10
test eax, eax
je 0x1017dea3
jmp 0x1017dec4
push dword [esp + 0x34]
or dword [esi + 0xf34], 0x400
call fcn.10277284
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov edi, dword [esp + 0x34]
push edi
call fcn.10277284
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push 0x10404af8
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 6
push eax
call fcn.1026eb3b
push 0x10404af8
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 6
push eax
call fcn.1026eb3b
int3