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

Disassembly:
sub esp, 0x540
mov eax, dword [0x4e5b00]
xor eax, esp
mov dword [esp + 0x53c], eax
mov eax, dword [esp + 0x544]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x3ff
mov edi, ecx
lea ecx, [esp + 0x14d]
push ebx
push ecx
mov esi, edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ebx
mov byte [esp + 0x154], bl
call fcn.00465660
add esp, 0xc
push 0x103
lea edx, [esp + 0x45]
push ebx
push edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x4c], bl
call fcn.00465660
add esp, 0xc
call fcn.0040f0a0
test al, al
je 0x415514
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x415514
mov ebp, dword [sym.imp.WS2_32.dll_htons]
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, 2
push 0x35
mov word [esp + 0x34], ax
call ebp
push edi
mov word [esp + 0x36], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x400
lea ecx, [esp + 0x14c]
push ebx
push ecx
mov dword [esp + 0x40], eax
call fcn.00465660
add esp, 0xc
mov edx, 1
push pe_nt_image_headers32
mov word [esp + 0x14c], dx
call ebp
push 1
mov word [esp + 0x14e], ax
call ebp
mov word [esp + 0x14c], ax
xor eax, eax
mov word [esp + 0x14e], ax
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415431
sub eax, ecx
push eax
lea ecx, [esp + 0x159]
push esi
push ecx
call fcn.00460b70
mov eax, esi
add esp, 0xc
lea ecx, [esp + 0x155]
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415458
sub eax, edi
lea edx, [esp + eax + 0x155]
lea eax, [esp + 0x155]
cmp eax, edx
jae 0x4154a4
cmp byte [ecx], 0x2e
jne 0x415483
mov edx, ecx
sub edx, ebx
mov byte [edx - 1], bl
xor ebx, ebx
jmp 0x415484
inc ebx
mov eax, esi
inc ecx
lea edi, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415490
sub eax, edi
lea eax, [esp + eax + 0x155]
cmp ecx, eax
jb 0x415473
sub ecx, ebx
mov eax, esi
mov byte [ecx - 1], bl
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4154b0
sub eax, edx
push 1
lea edi, [esp + eax + 0x15a]
call ebp
push 1
mov word [edi + 2], ax
call ebp
mov word [edi], ax
mov eax, esi
mov dword [esp + 0x24], 0x10
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4154e0
mov edi, dword [esp + 0x1c]
push 0x10
sub eax, ecx
lea ecx, [esp + 0x34]
push ecx
push 0
add eax, 0x12
push eax
lea edx, [esp + 0x158]
push edx
push edi
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41551b
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x415697
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x34]
push ecx
push 0
push 0x400
lea edx, [esp + 0x158]
push edx
push edi
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [esp + 0x2c], eax
test eax, eax
jl 0x41550d
mov eax, dword [esp + 0x14c]
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
push eax
lea esi, [esp + 0x158]
call ebx
movzx eax, ax
test eax, eax
jle 0x41558c
mov ecx, eax
xor eax, eax
cmp byte [esi], al
je 0x415577
lea esp, [esp]
inc eax
cmp byte [eax + esi], 0
jne 0x415570
sub ecx, 1
mov edx, dword [esp + 0x18]
lea esi, [esi + eax + 5]
lea eax, [edx + eax + 5]
mov dword [esp + 0x18], eax
jne 0x415563
mov ecx, dword [esp + 0x14e]
push ecx
call ebx
movzx eax, ax
test eax, eax
je 0x41550d
jle 0x41568c
mov dword [esp + 0x20], eax
mov ebp, dword [esp + 0x18]
xor eax, eax
cmp ebp, dword [esp + 0x2c]
jg 0x415656
jmp 0x4155c0
cmp byte [eax + esi], 0
je 0x4155c9
inc eax
jmp 0x4155c0
mov edi, 2
cmp eax, 2
je 0x4155d6
lea edi, [eax + 1]
movzx edx, word [edi + esi]
push edx
call ebx
cmp ax, 1
je 0x4155fe
movzx eax, word [edi + esi + 8]
push eax
call ebx
movzx eax, ax
add eax, edi
lea ecx, [eax + ebp + 0xa]
lea esi, [esi + eax + 0xa]
mov dword [esp + 0x18], ecx
jmp 0x415652
mov eax, dword [edi + esi + 0xa]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x41561c
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
jmp 0x415642
movzx edx, byte [esp + 0x17]
movzx ecx, byte [esp + 0x16]
push edx
push ecx
movzx edx, ah
push edx
movzx eax, al
push eax
lea ecx, [esp + 0x50]
push str._d._d._d._d
push ecx
call fcn.00460c94
add esp, 0x18
lea edx, [edi + ebp + 0xe]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0x1c]
sub dword [esp + 0x20], 1
jne 0x4155ab
cmp byte [esp + 0x14], 0
je 0x41568c
lea eax, [esp + 0x40]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x415670
mov ecx, dword [esp + 0x28]
sub eax, edx
push eax
lea eax, [esp + 0x44]
push eax
push ecx
call fcn.00460b70
add esp, 0xc
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [esp + 0x14]
mov ecx, dword [esp + 0x54c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004606fe
add esp, 0x540
ret