Function at 0x10009900
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x40
mov eax, dword [0x100d1040]
xor eax, esp
mov dword [esp + 0x38], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
xor ebx, ebx
push edi
mov edi, dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x10009957
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 4], 0xffffffff
cmp dword [esi + 0x28], ebx
jne 0x10009957
mov eax, dword [esi + 0x24]
mov ecx, dword [esi]
push ebx
push 0x1f4
push eax
push ecx
call edi
cmp eax, 0xffffffff
jne 0x10009951
call fcn.10002c20
jmp 0x10009957
mov edx, dword [esi + 0x24]
mov byte [eax + edx], bl
push 7
push str.PASV__r_n
lea ecx, [esp + 0x20]
mov dword [esi + 0x28], ebx
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.10002330
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x10009989
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi]
push ebx
push ecx
push eax
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100099cd
call fcn.10002c20
cmp dword [esp + 0x30], 0x10
mov esi, eax
jb 0x100099b9
mov eax, dword [esp + 0x1c]
push eax
call fcn.10057104
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1005710f
add esp, 0x40
ret
mov ecx, dword [esi + 0x24]
mov edx, dword [esi]
push ebx
push 0x1f4
push ecx
push edx
call edi
cmp eax, 0xffffffff
jne 0x10009a84
call fcn.10002c20
mov edi, eax
cmp edi, ebx
jl 0x10009b13
cmp edi, 1
je 0x10009b13
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x10009a21
cmp byte [eax], bl
je 0x10009a21
push str._n226
push eax
call fcn.10057ae0
add esp, 8
test eax, eax
je 0x10009a21
mov dword [esi + 0x28], 1
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
mov eax, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
call fcn.10009840
mov edi, eax
cmp edi, ebx
jl 0x10009af6
cmp edi, 1
je 0x10009af6
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x10009a8f
call fcn.10002c20
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.10002150
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1005710f
add esp, 0x40
ret
mov ecx, dword [esi + 0x24]
mov byte [eax + ecx], bl
jmp 0x100099fd
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x10]
mov edx, 2
push eax
mov dword [esp + 0x3c], ecx
mov word [esp + 0x38], dx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esi + 4]
push 0x10
lea ecx, [esp + 0x38]
push ecx
push edx
mov word [esp + 0x42], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x10009a60
lea ecx, [esp + 0x18]
call fcn.10002150
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1005710f
add esp, 0x40
ret
lea ecx, [esp + 0x18]
call fcn.10002150
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1005710f
add esp, 0x40
ret
cmp dword [esp + 0x30], 0x10
jb 0x10009b27
mov eax, dword [esp + 0x1c]
push eax
call fcn.10057104
add esp, 4
mov ecx, dword [esp + 0x44]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1005710f
add esp, 0x40
ret