Function at 0x403430
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x1a4
lea eax, [esp + 0x14]
push ebx
push ebp
push esi
push edi
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
cmp eax, 0xffffffff
jne 0x40345b
or eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov esi, dword [esp + 0x1b8]
movsx ecx, byte [esi]
push ecx
call fcn.00404850
add esp, 4
test eax, eax
push esi
je 0x40347a
call sub.WSOCK32.dll_gethostbyname
jmp 0x403491
call sub.WSOCK32.dll_inet_addr
push 2
lea edx, [esp + 0x24]
push 4
push edx
mov dword [esp + 0x2c], eax
call sub.WSOCK32.dll_gethostbyaddr
mov ebx, eax
test ebx, ebx
jne 0x4034ac
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov ebp, eax
xor eax, eax
mov dword [esp + 0x10], eax
lea edi, [esp + 0x14]
mov dword [esp + 0x14], eax
push 0x19
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov edx, dword [ebx + 0xc]
movsx ecx, word [ebx + 0xa]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [ebx + 8]
mov word [esp + 0x14], cx
call sub.WSOCK32.dll_htons
lea edx, [esp + 0x10]
push 0x10
push edx
push ebp
mov word [esp + 0x1e], ax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x403522
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffffc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x403554
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffffb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov al, byte [0x411648]
mov bl, 0x32
cmp al, bl
je 0x40357a
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff9b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [0x412a50]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x411648
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b6a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x403607
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffffa
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x403639
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
cmp byte [0x411648], bl
je 0x40365c
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff9a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [0x412a58]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x411648
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b6a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4036e9
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4037c6
cmp byte [0x411648], bl
je 0x403727
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff99
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [0x412a54]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, 0x411648
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c0]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b6a4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4037e1
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x403813
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
cmp byte [0x411648], bl
je 0x403836
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff98
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [0x412a48]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x411648
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b6a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4038c3
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x4038f5
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
cmp byte [0x411648], 0x33
je 0x403919
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff97
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [esp + 0x1c0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, 0x411648
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x40b6a8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, 0x411648
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x40b6a8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
or ecx, 0xffffffff
mov edi, 0x411648
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._r_n._r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x403a2a
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
push 0
push 0x1000
push 0x411648
push ebp
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x403a5c
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xfffffff2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
cmp byte [0x411648], bl
je 0x403a7f
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
mov eax, 0xffffff96
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a4
ret
mov edi, dword [0x412a4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x411648
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b6a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x411648
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x411648
push ebp
call sub.WSOCK32.dll_send
push ebp
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1a4
ret