Function at 0x406610
Capabilities:
Create udp socket
Get hostname
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51fe66
mov eax, dword fs:[0]
push eax
sub esp, 0x1e8
mov eax, dword [0x596738]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0040ddd9
mov eax, dword [esi + 0x1290]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push eax
mov eax, dword [esi + 0x20]
push 1
push 0x80
push eax
call edi
mov eax, dword [esi + 0x1290]
mov ecx, dword [esi + 0x20]
push eax
xor ebx, ebx
push ebx
push 0x80
push ecx
call edi
push 1
mov ecx, esi
call fcn.0040ef84
mov edx, dword [esi + 0xd44]
mov eax, dword [edx + 0x160]
lea ecx, [esi + 0xd44]
push ebx
push esi
call eax
mov ecx, dword [esi + 0xd64]
push ebx
push 1
push 0x401
push ecx
call edi
push ebx
push ebx
push 0x52f7b8
push 0x3e8
mov ecx, esi
call fcn.00412257
push eax
lea ecx, [esi + 0xd44]
call fcn.0040e782
mov edx, dword [esi + 0xd64]
push ebx
push ebx
push 0x414
push edx
call edi
mov eax, dword [esi + 0xd64]
push ebx
push 0xcdfaff
push 0x413
push eax
call edi
mov ecx, dword [esi + 0xd64]
push 0xc8
push ebx
push 0x403
push ecx
call edi
mov edx, dword [esi + 0xdd4]
mov eax, dword [edx + 0x160]
lea ecx, [esi + 0xdd4]
push ebx
push esi
call eax
mov ecx, dword [esi + 0xdf4]
push ebx
push 1
push 0x401
push ecx
call edi
push ebx
push ebx
push 0x52f7a4
push 0x467
mov ecx, esi
call fcn.00412257
push eax
lea ecx, [esi + 0xdd4]
call fcn.0040e782
mov edx, dword [esi + 0xdf4]
push ebx
push ebx
push 0x414
push edx
call edi
mov eax, dword [esi + 0xdf4]
push ebx
push 0xcdfaff
push 0x413
push eax
call edi
mov ecx, dword [esi + 0xdf4]
push 0xc8
push ebx
push 0x403
push ecx
call edi
push 0x52f780
push 0x435
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041236d
push 0x403
mov ecx, esi
mov dword [esi + 0xe64], 0x70
call fcn.00412257
mov edx, dword [eax + 0x20]
push ebx
push 5
push 0x14e
push edx
call edi
push ebx
push 0x410
mov ecx, esi
mov dword [esi + 0x1298], ebx
mov dword [esi + 0x129c], ebx
mov dword [esi + 0x12a0], ebx
mov dword [esi + 0x12a4], ebx
mov dword [esi + 0x12a8], ebx
mov dword [esi + 0x12ac], ebx
mov dword [esi + 0x12b0], ebx
mov dword [esi + 0x12b4], ebx
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x433
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x434
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x411
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x436
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x437
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x431
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x43c
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x43d
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x432
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x445
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x446
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x406
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x407
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x40a
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x40d
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x408
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x40b
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x40e
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x409
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x40c
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x450
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x451
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
push ebx
push 0x452
mov ecx, esi
call fcn.00412257
mov ecx, eax
call fcn.0041247a
call fcn.0041994d
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4069df
push 0x80004005
call fcn.004015f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1e8], eax
mov dword [ebp - 4], ebx
call fcn.0041994d
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x406a0e
push 0x80004005
call fcn.004015f0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1ec], eax
push 0x32
lea ecx, [ebp - 0x44]
push ecx
mov byte [ebp - 4], 1
mov dword [esi + 0xfb8], ebx
mov dword [esi + 0xf58], 0xcf
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x406a53
push ebx
push ebx
push str.Get_host_name_is_failure_
mov ecx, esi
call fcn.00414a5f
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
cmp eax, ebx
jne 0x406a75
xor ecx, ecx
jmp 0x406a8d
mov ecx, eax
lea edx, [ecx + 1]
mov dword [ebp - 0x1f4], edx
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x406a80
sub ecx, dword [ebp - 0x1f4]
push ecx
push eax
lea ecx, [ebp - 0x1e8]
call fcn.004055e0
push 0xf
push str.255.255.255.255
lea ecx, [ebp - 0x1ec]
call fcn.004055e0
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
movzx edx, byte [ecx]
mov byte [esi + 0xfcc], dl
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
movzx edx, byte [ecx + 1]
mov byte [esi + 0xfcd], dl
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
movzx edx, byte [ecx + 2]
mov byte [esi + 0xfce], dl
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
movzx edx, byte [ecx + 3]
lea eax, [ebp - 0x1e4]
push eax
push 0x202
mov byte [esi + 0xfcf], dl
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, ebx
jne 0x406d17
mov eax, dword [ebp - 0x1e4]
cmp al, 2
jne 0x406d11
shr eax, 8
cmp al, 2
jne 0x406d11
mov edx, dword [ebp - 0x1e8]
mov ecx, 2
lea edi, [esi + 0x98]
push edx
mov word [edi], cx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x9c40
mov dword [esi + 0x9c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x9a], ax
mov eax, 2
push 0xc350
mov word [esi + 0xa8], ax
mov dword [esi + 0xac], 0xffffffff
call dword [sym.imp.WS2_32.dll_htons]
push 0x11
push 2
push 2
mov word [esi + 0xaa], ax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x94], eax
cmp eax, 0xffffffff
jne 0x406bb1
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
push ebx
push str.we_could_not_socket
mov ecx, esi
call fcn.00414a5f
mov edx, dword [esi]
mov eax, dword [edx + 0x180]
mov ecx, esi
call eax
jmp 0x406d25
push 0x10
push edi
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x406c08
mov ecx, dword [esi + 0x94]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
push ebx
push str.bind_
mov ecx, esi
call fcn.00414a5f
mov edx, dword [esi]
mov eax, dword [edx + 0x180]
mov ecx, esi
call eax
lea ecx, [ebp - 0x1ec]
call fcn.00401130
lea ecx, [ebp - 0x1e8]
call fcn.00401130
jmp 0x406d73
mov edx, dword [esi + 0x94]
push 4
lea ecx, [ebp - 0x1f0]
push ecx
push 0x20
push 0xffff
mov edi, 1
push edx
mov dword [ebp - 0x1f0], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x94]
push edi
push 0x401
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
jne 0x406c7e
mov edx, dword [esi + 0x94]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
push ebx
push 0x52f718
mov ecx, esi
call fcn.00414a5f
mov eax, dword [esi]
mov edx, dword [eax + 0x180]
mov ecx, esi
call edx
jmp 0x406bed
mov ecx, dword [esi + 0x20]
lea eax, [ebp - 0x54]
push eax
push ecx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
sub eax, 0x11d
push edi
mov dword [ebp - 0x48], eax
sub eax, ecx
push eax
mov eax, dword [ebp - 0x54]
sub edx, eax
push edx
push ecx
push eax
mov ecx, esi
call fcn.004123f8
push 0x52f6c0
push 0x467
mov ecx, esi
mov dword [esi + 0xe78], edi
call fcn.00412257
mov ecx, eax
call fcn.0041236d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 0x20]
push ebx
push 0x3e8
push 3
push eax
call dword [sym.imp.USER32.dll_SetTimer]
lea ecx, [ebp - 0x1ec]
call fcn.00401130
lea ecx, [ebp - 0x1e8]
call fcn.00401130
mov eax, edi
jmp 0x406d75
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
push ebx
push str.we_could_not_find_a_usable
mov ecx, esi
call fcn.00414a5f
mov eax, dword [ebp - 0x1ec]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1e8]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00508f7d
mov esp, ebp
pop ebp
ret