Function at 0x42cbe0
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [0x48db98]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x13c], eax
push esi
mov esi, dword [ebx]
push edi
xor eax, eax
mov byte [esp + 0x40], 0
mov ecx, 0x3f
lea edi, [esp + 0x41]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0x60]
test eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], 0
je 0x42cc7a
push eax
call sub.WS2_32.dll_inet_addr
mov edx, dword [esi + 0x60]
mov eax, edx
lea edi, [eax + 1]
jmp 0x42cc40
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42cc40
sub eax, edi
cmp eax, 1
jle 0x42cc7a
push 0
push edx
push esi
call fcn.00422a40
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], eax
je 0x42cc7a
mov ecx, dword [esi + 0x60]
lea edx, [esp + 0x40]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x42cc70
mov al, byte [esp + 0x40]
test al, al
jne 0x42ccad
mov edx, dword [ebx + 0x2b0]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x20], 0x10
call sub.WS2_32.dll_getsockname
test eax, eax
jl 0x42cd67
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42cd71
push eax
push esi
call fcn.00422700
add esp, 8
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
test ebx, ebx
jl 0x42ceb0
mov al, byte [esp + 0x13]
test al, al
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2b4], ebx
jne 0x42cd2f
mov eax, dword [esp + 0x18]
xor edx, edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov eax, dword [eax]
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov word [esp + 0x30], 2
mov dword [esp + 0x34], 0
push 0x10
lea ecx, [esp + 0x34]
push ecx
push ebx
mov word [esp + 0x3e], 0
call sub.WS2_32.dll_bind
test eax, eax
jl 0x42cea9
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
mov dword [esp + 0x20], 0x10
call sub.WS2_32.dll_getsockname
test eax, eax
jge 0x42cda8
push str.getsockname___failed
jmp 0x42ceb5
mov al, byte [esp + 0x13]
test al, al
jne 0x42ccc3
lea eax, [esp + 0x40]
push eax
push str.couldt_find_my_own_IP_address___s_
push esi
call fcn.0042a840
add esp, 0xc
mov eax, 0x1e
mov ecx, dword [esp + 0x144]
call fcn.0044ffb2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x22]
push ecx
call sub.WS2_32.dll_ntohs
push 1
push ebx
mov edi, eax
call sub.WS2_32.dll_listen
test eax, eax
jge 0x42cdca
push str.listen_2__failed_on_socket
jmp 0x42ceb5
mov eax, dword [esp + 0x18]
test eax, eax
je 0x42cddb
mov edx, dword [eax]
mov eax, dword [edx + 0xc]
mov eax, dword [eax]
jmp 0x42cddf
lea eax, [esp + 0x34]
mov eax, dword [eax]
lea ecx, [esp + 0x26]
push ecx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x2a]
push ecx
lea edx, [esp + 0x2c]
push edx
push str._hu._hu._hu._hu
push eax
call sub.WS2_32.dll_inet_ntoa
push eax
call fcn.004532fc
movzx eax, word [esp + 0x3e]
movzx ecx, word [esp + 0x3c]
movzx edx, word [esp + 0x3a]
movzx esi, di
mov edi, dword [esp + 0x34]
push esi
push eax
movzx eax, word [esp + 0x40]
push ecx
push edx
push eax
push str.Telling_server_to_connect_to__d._d._d._d:_d_n
push edi
call fcn.0042a770
movzx edx, word [esp + 0x5a]
movzx eax, word [esp + 0x58]
mov ecx, esi
and ecx, 0xff
push ecx
movzx ecx, word [esp + 0x5a]
shr esi, 8
push esi
mov esi, dword [ebp + 8]
push edx
movzx edx, word [esp + 0x60]
push eax
push ecx
push edx
push str.PORT__d__d__d__d__d__d
push esi
call fcn.0042c460
add esp, 0x54
test eax, eax
jne 0x42cec3
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.0042bfe0
add esp, 0xc
test eax, eax
jne 0x42cec3
cmp dword [esp + 0x14], 0xc8
je 0x42ce94
push str.Server_does_not_grok_PORT__try_without_it_
push edi
jmp 0x42ceb6
xor eax, eax
mov ecx, dword [esp + 0x144]
call fcn.0044ffb2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.bind_2__failed_on_socket
jmp 0x42ceb5
push str.socket_2__failed___s_
push esi
call fcn.0042a840
add esp, 8
mov eax, 0x1e
mov ecx, dword [esp + 0x144]
call fcn.0044ffb2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret