Function at 0x4156b0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x438
mov eax, dword [0x4e5b00]
xor eax, esp
mov dword [esp + 0x434], eax
mov eax, dword [esp + 0x43c]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x3ff
mov edi, ecx
lea ecx, [esp + 0x45]
push ebx
push ecx
mov esi, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], ebx
mov byte [esp + 0x4c], bl
call fcn.00465660
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], ebx
call fcn.0040f0a0
test al, al
je 0x415861
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x415861
mov ebp, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
mov edx, 2
mov dword [esp + 0x30], eax
push 0x35
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov word [esp + 0x34], dx
call ebp
push edi
mov word [esp + 0x36], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x400
mov dword [esp + 0x38], eax
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.00465660
add esp, 0xc
mov ecx, 1
push pe_nt_image_headers32
mov word [esp + 0x44], cx
call ebp
push 1
mov word [esp + 0x46], ax
call ebp
mov word [esp + 0x44], ax
xor edx, edx
mov eax, esi
mov word [esp + 0x46], dx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415795
sub eax, ecx
push eax
lea eax, [esp + 0x51]
push esi
push eax
call fcn.00460b70
mov eax, esi
add esp, 0xc
lea ecx, [esp + 0x4d]
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4157b6
sub eax, edi
lea edx, [esp + eax + 0x4d]
lea eax, [esp + 0x4d]
cmp eax, edx
jae 0x4157f3
cmp byte [ecx], 0x2e
jne 0x4157db
mov edx, ecx
sub edx, ebx
mov byte [edx - 1], bl
xor ebx, ebx
jmp 0x4157dc
inc ebx
mov eax, esi
inc ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4157e2
sub eax, edi
lea eax, [esp + eax + 0x4d]
cmp ecx, eax
jb 0x4157cb
sub ecx, ebx
mov eax, esi
mov byte [ecx - 1], bl
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x415800
sub eax, edx
push 1
lea edi, [esp + eax + 0x52]
call ebp
push 0x10
mov word [edi + 2], ax
call ebp
mov word [edi], ax
mov eax, esi
mov dword [esp + 0x14], 0x10
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415830
mov ebx, dword [esp + 0x1c]
push 0x10
sub eax, ecx
lea ecx, [esp + 0x34]
push ecx
push 0
add eax, 0x12
push eax
lea edx, [esp + 0x50]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x415868
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x415991
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0
push 0x400
lea edx, [esp + 0x50]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov dword [esp + 0x28], edi
test edi, edi
jl 0x41585a
mov eax, dword [esp + 0x44]
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
push eax
lea esi, [esp + 0x50]
call ebp
movzx eax, ax
test eax, eax
jle 0x4158cc
mov ecx, eax
xor eax, eax
cmp byte [esi], al
je 0x4158b7
nop
inc eax
cmp byte [eax + esi], 0
jne 0x4158b0
sub ecx, 1
mov edx, dword [esp + 0x10]
lea esi, [esi + eax + 5]
lea eax, [edx + eax + 5]
mov dword [esp + 0x10], eax
jne 0x4158a9
mov ecx, dword [esp + 0x46]
push ecx
call ebp
movzx eax, ax
mov dword [esp + 0x20], eax
test eax, eax
je 0x41585a
mov dword [esp + 0x18], 0
jle 0x415980
mov ebx, dword [esp + 0x10]
xor eax, eax
cmp ebx, edi
jg 0x41594c
lea ebx, [ebx]
cmp byte [eax + esi], 0
je 0x415909
inc eax
jmp 0x415900
mov edi, 2
cmp eax, 2
je 0x415916
lea edi, [eax + 1]
movzx edx, word [edi + esi]
push edx
call ebp
cmp ax, 0x10
je 0x41593e
movzx eax, word [edi + esi + 8]
push eax
call ebp
movzx eax, ax
add eax, edi
lea ecx, [ebx + eax + 0xa]
lea esi, [esi + eax + 0xa]
mov dword [esp + 0x10], ecx
jmp 0x41594c
movzx edx, word [edi + esi + 8]
push edx
call ebp
cmp ax, 2
ja 0x415961
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jge 0x415980
mov edi, dword [esp + 0x28]
jmp 0x4158f0
movsx eax, byte [edi + esi + 0xa]
mov edx, dword [esp + 0x2c]
push eax
lea ecx, [edi + esi + 0xb]
push ecx
push edx
call fcn.00469530
add esp, 0xc
mov ebx, 1
jmp 0x415984
mov bl, byte [esp + 0x24]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, bl
mov ecx, dword [esp + 0x444]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004606fe
add esp, 0x438
ret