Function at 0x10009471
Capabilities:
Read and send data from client to server
Read file on windows
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x20
mov eax, dword [ecx]
mov edi, dword [ebp + 8]
mov esi, edx
cmp eax, 2
jge 0x100094b9
cmp eax, 1
je 0x100094e1
test eax, eax
jne 0x10009aaa
test edi, edi
je 0x10009a8c
movzx ebx, byte [esi]
push 1
call dword [0x10016020]
add esp, 4
push eax
push ebx
call sub.msvcrt.dll_fputc
pop ecx
pop edx
inc esi
dec edi
jmp 0x10009496
je 0x100094f2
cmp eax, 3
jne 0x10009aaa
mov eax, dword [ecx + 4]
push dword [eax]
push esi
call sub.msvcrt.dll_strcmp
pop ecx
pop edx
test eax, eax
jne 0x10009a8c
push 0
call dword [sym.imp.KERNEL32.dll_ExitThread]
mov ecx, dword [ecx + 4]
mov edx, esi
push edi
call fcn.1000a575
pop eax
jmp 0x10009a8c
mov eax, dword [ecx + 4]
mov edx, esi
mov ecx, dword [eax + 8]
mov dword [esp + 4], eax
push edi
call fcn.1000a8a8
pop ecx
mov eax, dword [esp + 4]
mov edi, dword [eax + 8]
mov edx, dword [edi + 4]
mov ebx, dword [edi + 0xc]
sub ebx, edx
push 4
pop eax
cmp ebx, eax
jb 0x10009a8c
mov ecx, edi
call fcn.1000b3aa
cmp eax, 0xfffffffc
jae 0x10009a94
mov esi, eax
add eax, 4
cmp ebx, eax
jb 0x10009a8c
mov ecx, edi
call fcn.1000b397
mov ecx, edi
lea edx, [esp + 8]
push 1
push esi
call fcn.1000ade4
pop ecx
pop edx
cmp dword [esp + 8], esi
jne 0x10009a9f
mov ebx, eax
push 0
push 0x21
push 0x10017090
call fcn.100129b9
add esp, 0xc
push 0x18
pop ecx
call fcn.10010d17
mov edi, eax
push 3
pop ecx
mov edx, ebx
push esi
call fcn.1000a80f
pop ecx
mov ecx, eax
mov esi, eax
call fcn.1000b2ab
mov ecx, eax
not eax
and ecx, 0x7fff
movzx eax, ax
mov word [edi], cx
shr eax, 0xf
mov ecx, esi
mov dword [edi + 8], eax
call fcn.1000b2ab
movzx ecx, ax
cmp cx, 5
mov dword [edi + 4], ecx
jae 0x100095d6
cmp ax, 2
jae 0x1000960d
test ax, ax
je 0x1000965b
cmp dword [edi + 8], 0
jne 0x1000965b
jmp 0x1000966a
cmp ax, 0x1001
jae 0x1000961e
cmp ax, 6
jb 0x100096f0
cmp ax, 0xfff
ja 0x100096a0
cmp ax, 6
jne 0x10009ab5
cmp dword [edi + 8], 0
je 0x100096f0
mov ecx, esi
call fcn.1000b397
jmp 0x10009662
jne 0x1000964a
cmp dword [edi + 8], 0
je 0x1000966a
mov ecx, esi
call fcn.1000b51a
jmp 0x10009645
cmp ax, 0xffff
je 0x1000968c
cmp ax, 0x1001
je 0x10009677
cmp ax, 0x1002
jne 0x10009ab5
cmp dword [edi + 8], 0
je 0x100096f0
mov ecx, esi
call fcn.1000b397
mov dword [edi + 0xc], eax
jmp 0x10009697
cmp ax, 4
mov eax, dword [edi + 8]
jae 0x100096cf
test eax, eax
je 0x10009a5b
mov ecx, esi
call fcn.1000b51a
mov dword [edi + 0xc], eax
jmp 0x100096f0
mov ecx, esi
call fcn.1000b2ab
mov word [edi + 0xc], ax
jmp 0x100096f0
cmp dword [edi + 8], 0
je 0x100096f0
mov ecx, esi
call fcn.1000b397
mov dword [edi + 0xc], eax
lea edx, [edi + 0x14]
jmp 0x100096e0
mov ecx, esi
call fcn.1000b2ab
mov word [edi + 0xc], ax
mov ecx, esi
call fcn.1000b51a
jmp 0x100096ed
mov eax, dword [edi + 8]
mov ecx, esi
mov dword [esp + 0x18], eax
call fcn.1000b397
cmp dword [esp + 0x18], 0
je 0x100096ed
mov ecx, esi
mov dword [edi + 0xc], eax
call fcn.1000b51a
mov ecx, esi
mov dword [edi + 0x10], eax
call fcn.1000b2ab
mov word [edi + 0x14], ax
jmp 0x100096f0
test eax, eax
je 0x100096f0
mov ecx, esi
call fcn.1000b51a
lea edx, [edi + 0x14]
mov dword [edi + 0xc], eax
mov ecx, esi
push 1
push 0xffffffffffffffff
call fcn.1000ade4
pop ecx
pop edx
mov dword [edi + 0x10], eax
push 0
push 0x21
push 0x10017090
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
test edi, edi
je 0x10009a8c
mov eax, dword [edi + 4]
cmp eax, 5
jge 0x1000977f
cmp eax, 2
jge 0x100097ba
cmp eax, 1
je 0x100098cf
test eax, eax
jne 0x100099c4
cmp dword [edi + 8], 0
je 0x10009a3c
push 0
push 0x20
push 0x10016ff0
call fcn.100129b9
add esp, 0xc
movzx ecx, word [edi]
mov ebx, dword [edi + 0xc]
xor edx, edx
push 0
call fcn.1000a11b
pop ecx
mov esi, eax
push 0
push 0x21
push 0x10017090
call fcn.100129b9
add esp, 0xc
mov ecx, ebx
call fcn.10010d5b
mov dword [esi + 0xc], eax
jmp 0x100099f9
cmp eax, 0x1001
jge 0x100097f4
cmp eax, 6
jge 0x10009863
cmp dword [edi + 8], 0
je 0x10009a3c
mov esi, 0x100193b0
mov esi, dword [esi]
test esi, esi
je 0x1000993a
mov ecx, dword [esi]
cmp dword [ecx + 0xc], 0
jne 0x100097b5
call fcn.10008b3f
add esi, 4
jmp 0x1000979e
jne 0x10009894
cmp dword [edi + 8], 0
je 0x10009a3c
mov eax, dword [esp + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [eax + 0xc]
push dword [edi + 0x10]
call fcn.1000935d
pop ecx
mov ecx, eax
mov esi, eax
call fcn.100093f4
movzx ecx, word [edi]
movzx ebx, word [esi]
push 2
pop edx
jmp 0x10009927
jne 0x100098a9
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x18]
mov eax, dword [edi + 0xc]
mov dword [esp + 8], 2
mov dword [esp + 0x10], eax
sub esp, 0x10
movsd xmm0, qword [esp + 0x18]
movsd xmm1, qword [esp + 0x20]
movsd qword [esp + 8], xmm1
movsd qword [esp], xmm0
call fcn.10010c71
add esp, 0x10
test eax, eax
je 0x10009a48
mov esi, eax
push 0
push 0x49
push 0x10016bb0
call fcn.100129b9
add esp, 0xc
push 0
push dword [edi + 0x14]
push dword [edi + 0x10]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_send]
jmp 0x10009a3c
cmp eax, 0xfff
jg 0x10009942
cmp eax, 6
jne 0x100099c4
cmp dword [edi + 8], 0
je 0x10009a3c
mov eax, dword [edi + 0xc]
movzx ecx, word [edi]
mov dword [0x100163e8], eax
push 6
pop edx
jmp 0x100099a1
cmp eax, 4
jge 0x10009952
mov ecx, edi
call fcn.10009ace
jmp 0x100099f7
cmp eax, 0xffff
jge 0x100099aa
cmp eax, 0x1002
jne 0x100099c4
mov ecx, dword [esp + 4]
mov edx, edi
call fcn.10009da1
jmp 0x10009a3c
cmp dword [edi + 8], 0
je 0x10009a3c
mov eax, dword [esp + 4]
mov esi, dword [eax + 0xc]
push 0
push 8
pop eax
push eax
mov eax, 0x10016fe4
push eax
call fcn.100129b9
add esp, 0xc
mov ebx, eax
push 0
push 8
pop eax
push eax
mov eax, 0x10016fe4
push eax
call fcn.100129b9
add esp, 0xc
mov ecx, esi
mov edx, ebx
push ebx
call fcn.1000935d
pop ecx
mov ecx, eax
mov esi, eax
call fcn.100093f4
movzx ecx, word [edi]
movzx ebx, word [esi]
xor edx, edx
inc edx
push 0
call fcn.1000a11b
pop ecx
mov esi, eax
mov word [eax + 0xc], bx
jmp 0x100099f9
movzx ecx, word [edi]
push 5
pop edx
jmp 0x100099a1
mov ecx, dword [esp + 4]
mov edx, edi
call fcn.10009bf9
jmp 0x100099f7
cmp dword [edi + 8], 0
je 0x10009a3c
mov esi, dword [edi + 0xc]
push 0
push 3
push 0x10016f39
call fcn.100129b9
add esp, 0xc
push eax
push esi
call sub.msvcrt.dll_fopen
pop ecx
pop edx
test eax, eax
je 0x10009a70
mov esi, eax
push eax
push 1
push dword [edi + 0x14]
push dword [edi + 0x10]
call sub.msvcrt.dll_fwrite
add esp, 0x10
push esi
call sub.msvcrt.dll_fclose
pop ecx
movzx ecx, word [edi]
push 4
pop edx
push 0
call fcn.1000a11b
jmp 0x100099f6
jne 0x100099c4
cmp dword [edi + 8], 0
je 0x10009a81
push 0
push 0x2d
push 0x10016c30
jmp 0x10009a51
push 0
push 0x38
push 0x10016c60
call fcn.100129b9
add esp, 0xc
movzx esi, word [edi]
push 0
push 0x15
push 0x10016ca0
call fcn.100129b9
add esp, 0xc
mov ecx, esi
mov edx, 0xffff
push eax
call fcn.1000a188
pop ecx
mov esi, eax
test esi, esi
je 0x10009a3c
mov ecx, esi
lea edx, [esp + 8]
call fcn.1000a2b4
mov ebx, eax
mov eax, dword [esp + 4]
mov edx, ebx
mov ecx, dword [eax + 0x10]
push dword [esp + 8]
call fcn.1000a8a8
pop ecx
push 0
push 0x21
push 0x10016cc0
call fcn.100129b9
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop eax
mov ecx, esi
call fcn.1000a1c5
mov ecx, edi
call fcn.1000a1c5
jmp 0x10009505
push 0
push 0x19
push 0x10016b90
call fcn.100129b9
add esp, 0xc
jmp 0x10009a3c
lea edx, [edi + 0x10]
mov ecx, esi
push 1
push 0xffffffffffffffff
call fcn.1000ade4
pop ecx
pop edx
jmp 0x10009662
movzx esi, word [edi]
push 0
push 0x1f
push 0x10016f40
jmp 0x100099e1
push 0
push 0x29
push 0x10016c00
jmp 0x10009a51
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
push 0x1c
push 0x10017010
jmp 0x10009abe
push 0
push 0x56
push 0x10017030
jmp 0x10009abe
push 0
push 0x33
push 0x10016b10
jmp 0x10009abe
push 0
push 0x1b
push 0x100170c0
call fcn.100129b9
add esp, 0xc
push 1
call dword [sym.imp.KERNEL32.dll_ExitThread]