Function at 0x401140
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get hostname
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x85c
mov eax, dword [0x418004]
xor eax, esp
mov dword [esp + 0x858], eax
push ebx
push esi
push edi
lea eax, [esp + 0x630]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0xbe8
push 0
push 0x419178
mov dword [esp + 0x1c], eax
call fcn.004022d0
add esp, 0xc
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
push 4
mov edi, eax
mov dword [esp + 0x1c], 1
lea eax, [esp + 0x1c]
push eax
push 0x20
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 2
push 0
mov word [esp + 0x34], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x43
mov dword [esp + 0x38], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x32], ax
lea eax, [esp + 0x30]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x401583
push 0x80
lea eax, [esp + 0x7e4]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x401583
lea eax, [esp + 0x7e0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x401583
mov eax, dword [eax + 0xc]
mov esi, dword [eax]
test esi, esi
je 0x401583
mov esi, dword [esi]
mov dword [esp + 0x10], esi
mov ebx, dword [esp + 0x13]
nop word [eax + eax]
push 0x2f4
lea eax, [esp + 0x33c]
mov dword [esp + 0x14], 0x10
push 0
push eax
call fcn.004022d0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push 0x2f4
lea eax, [esp + 0x348]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x401291
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401240
mov al, byte [esp + 0x42a]
cmp al, 1
jne 0x4013fe
lea eax, [esp + 0x354]
push eax
push ebx
lea ecx, [esp + 0x7c8]
call section..text
add esp, 8
test eax, eax
je 0x401240
mov eax, dword [esp + 0x33c]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x7c0]
push eax
mov dword [esp + 0x44], 0x60102
mov dword [esp + 0x4c], gethostbyname
mov dword [esp + 0x50], 0
call dword [sym.imp.WS2_32.dll_inet_addr]
movups xmm0, xmmword [esp + 0x354]
push 0xc0
mov dword [esp + 0x54], eax
lea eax, [esp + 0x70]
push 0
push eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], 0
movups xmmword [esp + 0x68], xmm0
call fcn.004022d0
movq xmm0, qword [str.pxelinux.0]
add esp, 0xc
mov ax, word [0x4164a0]
movq qword [esp + 0xac], xmm0
movups xmm0, xmmword [0x4164a4]
mov word [esp + 0xb4], ax
mov eax, dword [esp + 0x424]
movups xmmword [esp + 0x131], xmm0
mov dword [esp + 0x12c], eax
movups xmm0, xmmword [0x4164b4]
movzx eax, byte [esp + 0x428]
mov byte [esp + 0x130], al
mov eax, dword [0x4164d4]
movups xmmword [esp + 0x141], xmm0
mov dword [esp + 0x161], eax
movups xmm0, xmmword [0x4164c4]
movzx eax, byte [0x4164d8]
push 0x44
movups xmmword [esp + 0x155], xmm0
mov byte [esp + 0x169], al
mov dword [esp + 0x139], esi
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [esp + 0x26], ax
lea eax, [esp + 0x24]
push eax
push 4
push 0x129
lea eax, [esp + 0x50]
mov dword [esp + 0x34], 0xffffffff
push eax
push edi
call dword [sym.imp.WS2_32.dll_sendto]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x10
lea eax, [esp + 0x24]
push eax
push 4
push 0x129
lea eax, [esp + 0x50]
push eax
push edi
call dword [sym.imp.WS2_32.dll_sendto]
jmp 0x401240
cmp al, 3
jne 0x401240
lea eax, [esp + 0x354]
push eax
push ebx
lea ecx, [esp + 0x7c8]
call section..text
add esp, 8
test eax, eax
je 0x401240
mov eax, dword [esp + 0x33c]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x7c0]
push eax
mov dword [esp + 0x44], 0x60102
mov dword [esp + 0x4c], sendto
mov dword [esp + 0x50], 0
call dword [sym.imp.WS2_32.dll_inet_addr]
movups xmm0, xmmword [esp + 0x354]
push 0xc0
mov dword [esp + 0x54], eax
lea eax, [esp + 0x70]
push 0
push eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], 0
movups xmmword [esp + 0x68], xmm0
call fcn.004022d0
movq xmm0, qword [str.pxelinux.0]
add esp, 0xc
mov ax, word [0x4164a0]
movq qword [esp + 0xac], xmm0
movups xmm0, xmmword [0x4164dc]
mov word [esp + 0xb4], ax
mov eax, dword [esp + 0x424]
movups xmmword [esp + 0x131], xmm0
mov dword [esp + 0x12c], eax
movups xmm0, xmmword [0x4164ec]
movzx eax, byte [esp + 0x428]
mov byte [esp + 0x130], al
mov eax, dword [0x41650c]
movups xmmword [esp + 0x141], xmm0
mov dword [esp + 0x161], eax
movups xmm0, xmmword [0x4164fc]
movzx eax, byte [0x416510]
push 0x44
movups xmmword [esp + 0x155], xmm0
mov byte [esp + 0x169], al
mov dword [esp + 0x139], esi
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [esp + 0x26], ax
lea eax, [esp + 0x24]
push eax
push 4
push 0x129
lea eax, [esp + 0x50]
mov dword [esp + 0x34], 0xffffffff
push eax
push edi
call dword [sym.imp.WS2_32.dll_sendto]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x10
lea eax, [esp + 0x24]
push eax
push 4
push 0x129
lea eax, [esp + 0x50]
push eax
push edi
call dword [sym.imp.WS2_32.dll_sendto]
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x58]
push eax
push 0x4010d0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
jmp 0x401240
push 0
call fcn.004040ba
int3