Function at 0x10182fa0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x30], 0
xor ebp, ebp
mov dword [esp + 0x34], 0
xor ebx, ebx
mov dword [esp + 0x38], 0
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x83d64]
test eax, eax
je 0x10182ff1
push 2
push ebx
push 0x80
push dword [esi + 0x83d68]
call eax
add esp, 0x10
test eax, eax
jne 0x10183348
push edi
push 0x103e6804
push dword [esp + 0x48]
call fcn.10277843
mov edi, eax
add esp, 8
mov dword [esp + 0x44], edi
test edi, edi
jne 0x10183021
or dword [esi + 0xf34], 0x200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 4
push edi
call fcn.1027fc08
add esp, 4
cmp eax, 0x50
jne 0x10183335
push edi
call fcn.1027fc08
add esp, 4
cmp eax, 0x35
jne 0x10183335
jmp 0x10183050
mov edi, dword [esp + 0x44]
nop dword [eax + eax]
cmp ebx, 3
jge 0x101830ea
push edi
call fcn.1027fc08
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x10183331
cmp edi, 0x23
jne 0x1018307c
mov dword [esp + 0x14], 1
jmp 0x10183047
cmp edi, 0xa
jne 0x1018308b
mov dword [esp + 0x14], 0
jmp 0x10183092
cmp dword [esp + 0x14], 0
jne 0x10183047
push edi
call fcn.10270ab0
add esp, 4
test eax, eax
je 0x101830a6
mov ebp, 1
jmp 0x101830aa
test ebp, ebp
je 0x10183047
push edi
call fcn.10270ab0
add esp, 4
test eax, eax
je 0x101830cd
mov eax, dword [esp + ebx*4 + 0x34]
lea eax, [eax + eax*4]
lea eax, [eax - 0x18]
lea eax, [edi + eax*2]
mov dword [esp + ebx*4 + 0x34], eax
jmp 0x10183047
push edi
call fcn.10270bd0
mov edi, dword [esp + 0x48]
add esp, 4
test eax, eax
je 0x10183335
xor ebp, ebp
inc ebx
jmp 0x10183050
movzx ecx, word [esi + 0x16]
cmp dword [esp + 0x34], ecx
jne 0x10183314
movzx eax, word [esi + 0x14]
cmp dword [esp + 0x38], eax
jne 0x10183314
cmp dword [esp + 0x3c], 0xffff
jne 0x10183314
push 2
push ecx
mov ecx, esi
call fcn.10166910
mov ebp, eax
mov ecx, esi
push str.subtract__
push ebp
mov dword [esp + 0x24], ebp
call fcn.1016c200
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x14], ebx
cmp ax, word [esi + 0x14]
jae 0x101832c2
movzx eax, word [esi + 0x16]
push edi
push eax
push 2
push ebp
call fcn.10277579
xor ebp, ebp
xor eax, eax
add esp, 0x10
mov dword [esp + 0x18], ebp
cmp ax, word [esi + 0x16]
jae 0x101832ad
mov eax, ebx
and eax, 7
lea ecx, [eax + eax]
mov dword [esp + 0x30], ecx
mov ebx, dword [esi + 0x194]
mov eax, ebp
and eax, 1
or eax, ecx
add eax, eax
mov ecx, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
shr ebx, cl
and ebx, 3
lea eax, [eax + ebp*2]
mov dword [esp + 0x24], eax
movzx eax, word [eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esi + 8]
movzx ecx, word [esi + 0x5483c]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
movzx edi, ax
movzx eax, word [esi + 0x1e]
sar edx, cl
imul edx, eax
mov eax, ebp
sar eax, cl
mov ecx, dword [esp + 0x10]
add edx, eax
lea eax, [ebx + edx*4]
movzx eax, word [ecx + eax*2]
sub eax, edi
test eax, eax
jle 0x1018324c
mov eax, dword [esp + 0x24]
mov ebp, dword [esi + 0x194]
mov ecx, dword [esp + 0x20]
shr ebp, cl
movzx eax, word [eax]
and ebp, 3
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, word [esi + 0x5483c]
mov bx, ax
mov eax, dword [esi + 8]
mov ecx, edx
movzx edi, word [esi + 0x1e]
mov dword [esp + 0x10], eax
mov eax, edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov eax, edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
sar edx, cl
sar eax, cl
mov ecx, dword [esp + 0x10]
imul edx, edi
add edx, eax
lea eax, [edx*4]
add eax, ebp
mov ebp, dword [esp + 0x18]
mov ax, word [ecx + eax*2]
sub ax, bx
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
jmp 0x1018325f
movzx eax, word [esi + 0x5483c]
movzx edi, word [esi + 0x1e]
mov dword [esp + 0x24], 0
mov ebx, dword [esp + 0x14]
mov edx, ebx
movzx ecx, ax
sar edx, cl
movzx eax, di
imul edx, eax
mov eax, ebp
sar eax, cl
inc ebp
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], ebp
add edx, eax
mov eax, dword [esi + 0x194]
shr eax, cl
mov ecx, dword [esp + 0x24]
and eax, 3
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], cx
movzx eax, word [esi + 0x16]
mov ecx, dword [esp + 0x30]
cmp ebp, eax
jl 0x10183172
mov edi, dword [esp + 0x44]
movzx eax, word [esi + 0x14]
inc ebx
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
cmp ebx, eax
jl 0x10183143
push ebp
mov ecx, esi
call fcn.10168850
push edi
call fcn.102779c6
push 0x4018
lea eax, [esi + 0x20f38]
push 0
push eax
call fcn.1026c8e0
mov eax, dword [esi + 0x83d64]
add esp, 0x10
mov dword [esi + 0x24f50], 0
test eax, eax
je 0x1018333e
push 2
push 1
push 0x80
push dword [esi + 0x83d68]
call eax
add esp, 0x10
test eax, eax
jne 0x1018335f
jmp 0x1018333e
or dword [esi + 0xf34], 0x400
push edi
call fcn.102779c6
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 4
mov edi, dword [esp + 0x44]
push edi
call fcn.102779c6
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 4
push 0x103fa020
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 6
push eax
call fcn.1026cad5
push 0x103fa020
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 6
push eax
call fcn.1026cad5
int3