Function at 0x4717f0
Capabilities:
Read file on windows

Disassembly:
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0x10], 2
mov byte [esi + ecx + 0x25], 0xa
jne 0x47182e
mov ecx, dword [edi]
mov cl, byte [esi + ecx + 0x26]
cmp cl, 0xa
je 0x47182e
cmp dword [ebp + 0x10], ebx
je 0x47182e
mov byte [eax], cl
mov ecx, dword [edi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0x10], 3
mov byte [esi + ecx + 0x26], 0xa
push ebx
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x471bc6
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
jl 0x471bc6
cmp ecx, dword [ebp + 0x10]
ja 0x471bc6
mov eax, dword [edi]
add dword [ebp - 0x10], ecx
lea eax, [esi + eax + 4]
test byte [eax], 0x80
je 0x471a56
cmp byte [ebp - 2], 2
je 0x471a90
cmp ecx, ebx
je 0x47188b
mov ecx, dword [ebp - 0xc]
cmp byte [ecx], 0xa
jne 0x47188b
or byte [eax], 4
jmp 0x47188e
and byte [eax], 0xfb
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x10], eax
jae 0x471974
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x47195f
cmp al, 0xd
je 0x4718c1
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x471951
mov eax, dword [ebp - 0x10]
dec eax
cmp ecx, eax
jae 0x4718e0
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x4718db
inc ecx
inc ecx
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x471950
mov dword [ebp + 0x10], eax
jmp 0x47194d
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x471908
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x47194d
cmp dword [ebp - 0x18], 0
je 0x47194d
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x47192b
cmp byte [ebp - 1], 0xa
je 0x4718d6
mov byte [ebx], reloc.WS2_32.dll_connect
mov eax, dword [edi]
mov cl, byte [ebp - 1]
mov byte [esi + eax + 5], cl
jmp 0x471950
cmp ebx, dword [ebp - 0xc]
jne 0x471936
cmp byte [ebp - 1], 0xa
je 0x4718d6
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00474711
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x471951
mov byte [ebx], reloc.WS2_32.dll_connect
inc ebx
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x10], eax
jb 0x4718a4
jmp 0x471974
mov eax, dword [edi]
lea eax, [esi + eax + 4]
test byte [eax], 0x40
jne 0x47196f
or byte [eax], 2
jmp 0x471974
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, dword [ebp - 0xc]
cmp byte [ebp - 2], 1
mov dword [ebp - 0x10], eax
jne 0x471a56
test eax, eax
je 0x471a56
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x47199b
inc ebx
jmp 0x471a21
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x4719b2
cmp eax, 4
jg 0x4719bb
cmp ebx, dword [ebp - 0xc]
jb 0x4719bb
dec ebx
movzx ecx, byte [ebx]
inc eax
cmp byte [ecx + 0x49c0e0], 0
je 0x4719a3
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x49c0e0]
test ecx, ecx
jne 0x4719d8
call fcn.0046207f
mov dword [eax], 0x2a
jmp 0x471a52
inc ecx
cmp ecx, eax
jne 0x4719e1
add ebx, eax
jmp 0x471a21
mov ecx, dword [edi]
add ecx, esi
test byte [ecx + 4], 0x48
je 0x471a0f
inc ebx
cmp eax, 2
mov byte [ecx + 5], dl
jl 0x4719fd
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x25], dl
inc ebx
cmp eax, 3
jne 0x471a0b
mov dl, byte [ebx]
mov ecx, dword [edi]
mov byte [esi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x471a21
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.00474711
add esp, 0x10
mov eax, dword [ebp - 0x1c]
sub ebx, dword [ebp - 0xc]
shr eax, 1
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0xc]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x471a79
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004620a5
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x471a65
push eax
call fcn.0045cc72
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x471bfd
mov eax, dword [ebp - 0x10]
jmp 0x471bfd
mov eax, dword [ebp - 0x10]
mov edx, dword [edi]
xor ecx, ecx
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0x10], eax
mov dword [esi + edx + 0x30], ecx
jmp 0x471a56
cmp ecx, ebx
je 0x471aa2
mov ecx, dword [ebp - 0xc]
cmp word [ecx], 0xa
jne 0x471aa2
or byte [eax], 4
jmp 0x471aa5
and byte [eax], 0xfb
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x10], eax
jae 0x471bbb
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp cx, 0x1a
je 0x471ba3
cmp cx, 0xd
je 0x471ae0
mov word [ebx], cx
inc ebx
inc ebx
inc eax
inc eax
mov dword [ebp + 0x10], eax
jmp 0x471b95
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x471b0b
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x471b03
add eax, 4
mov dword [ebp + 0x10], eax
mov word [ebx], 0xa
jmp 0x471b93
mov dword [ebp + 0x10], ecx
jmp 0x471b8e
add dword [ebp + 0x10], 2
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [edi]
push dword [esi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x471b34
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x471b8e
cmp dword [ebp - 0x18], 0
je 0x471b8e
mov eax, dword [edi]
test byte [esi + eax + 4], 0x48
je 0x471b6a
cmp word [ebp - 8], 0xa
je 0x471af9
mov word [ebx], reloc.WS2_32.dll_connect
mov eax, dword [edi]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 5], cl
mov eax, dword [edi]
mov cl, byte [ebp - 7]
mov byte [esi + eax + 0x25], cl
mov eax, dword [edi]
mov byte [esi + eax + 0x26], 0xa
jmp 0x471b93
cmp ebx, dword [ebp - 0xc]
jne 0x471b76
cmp word [ebp - 8], 0xa
je 0x471af9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00474711
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x471b95
mov word [ebx], reloc.WS2_32.dll_connect
inc ebx
inc ebx
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x10], eax
jb 0x471abb
jmp 0x471bbb
mov ecx, dword [edi]
lea esi, [esi + ecx + 4]
test byte [esi], 0x40
jne 0x471bb3
or byte [esi], 2
jmp 0x471bbb
mov ax, word [eax]
mov word [ebx], ax
inc ebx
inc ebx
sub ebx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ebx
jmp 0x471a56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x471bea
call fcn.0046207f
mov dword [eax], 9
call fcn.00462092
mov dword [eax], esi
jmp 0x471a52
cmp eax, 0x6d
jne 0x471a4b
mov dword [ebp - 0x14], ebx
jmp 0x471a56
pop edi
pop ebx
pop esi
leave
ret