Function at 0x403dd0
Capabilities:
Create udp socket
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x413038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
mov dword [ebp - 0x140], edx
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x12c], 0
push 0x1000
push 0
mov dword [ebp - 0x134], 1
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x11c], edi
test edi, edi
je 0x404101
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x128], eax
test eax, eax
je 0x4040f9
cmp eax, 0xffffffff
je 0x4040f9
xor eax, eax
mov dword [ebp - 0x130], eax
lea ecx, [ecx]
mov dword [ebp - 0x120], 0
test eax, eax
jne 0x403e75
push 0x100
jmp 0x403e77
push 0
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x13c]
movzx eax, ax
push eax
push dword [ebp - 0x140]
mov ecx, ebx
call fcn.00403a00
add esp, 8
test eax, eax
jne 0x404090
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0
lea eax, [ebp - 0x118]
push eax
push 0
mov dword [ebp - 0x114], ebx
mov dword [ebp - 0x118], 1
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x404090
push 0
push 0x1000
push edi
push ebx
mov dword [edi], 0
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
mov dword [ebp - 0x144], ebx
test ebx, ebx
jle 0x404090
cmp ebx, 0xc
jbe 0x404090
movzx ecx, word [edi + 2]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xf
cmp eax, 3
je 0x403f37
cmp eax, 2
jne 0x403f41
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
test al, al
jns 0x404090
mov edi, 2
jmp 0x4040c8
test eax, eax
jne 0x404090
mov edx, ebx
mov ecx, edi
call fcn.00403c10
mov edi, eax
mov dword [ebp - 0x138], edi
test edi, edi
je 0x40408a
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0
mov ebx, edi
jmp 0x403f80
cmp word [ebx + 0x10a], 1
jne 0x40404b
cmp word [ebx + 0x108], 0xf
jne 0x40404b
cmp word [ebx + 0x10c], 3
jb 0x40404b
push 0x108
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x404055
push 0x108
push 0
push esi
call fcn.00408fa0
mov eax, dword [ebx + 0x110]
mov ecx, dword [ebp - 0x11c]
add esp, 0xc
movzx eax, word [eax + ecx]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x11c]
movzx eax, ax
lea edi, [esi + 8]
mov dword [esi + 4], eax
mov edx, dword [ebx + 0x110]
push edi
push dword [ebp - 0x144]
add edx, 2
call fcn.00403b50
add esp, 8
cmp byte [edi], 0
jne 0x40402b
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40404b
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x124], esi
test eax, eax
jne 0x404043
mov dword [ebp - 0x120], esi
jmp 0x404045
mov dword [eax], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, dword [ebx]
test ebx, ebx
jne 0x403f80
cmp dword [ebp - 0x120], 0
mov edi, dword [ebp - 0x138]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
jne 0x4040a8
lea ebx, [ebx]
mov esi, dword [edi]
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, esi
test esi, esi
jne 0x404070
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x130]
inc eax
mov dword [ebp - 0x130], eax
cmp eax, 2
jl 0x403e60
jmp 0x4040c2
mov esi, dword [edi]
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, esi
test esi, esi
jne 0x4040a8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, dword [ebp - 0x134]
push dword [ebp - 0x11c]
push 0
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call ebx
mov eax, dword [ebp - 0x128]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x120]
test eax, eax
jne 0x404121
cmp edi, 2
je 0x40411f
jmp 0x404101
push edi
push 0
call esi
push eax
call ebx
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x12c]
inc eax
mov dword [ebp - 0x12c], eax
cmp eax, 2
jl 0x403e08
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040541b
mov esp, ebp
pop ebp
ret