Function at 0x401510
Capabilities:
Create thread
Get socket status
Initialize winsock library
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdf4
mov eax, dword [0x4b3774]
xor eax, esp
mov dword [esp + 0xdf0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [eax]
mov dword [edi + 0x44], ecx
mov edx, dword [eax + 4]
mov dword [edi + 0x48], edx
mov esi, dword [edi + 0x58]
cmp dword [edi + 0x54], esi
mov dword [esp + 0x20], edi
jbe 0x40154f
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ebx, dword [edi + 0x54]
cmp ebx, dword [edi + 0x58]
jbe 0x40155d
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, esi
je 0x40158f
mov eax, dword [edi + 0x58]
sub eax, esi
sar eax, 2
test eax, eax
lea ecx, [eax*4]
lea edx, [ecx + ebx]
mov dword [esp + 0x14], edx
jle 0x401588
push ecx
push esi
push ecx
push ebx
call dword [sym.imp.MSVCR80.dll_memmove_s]
add esp, 0x10
mov eax, dword [esp + 0x14]
mov dword [edi + 0x58], eax
cmp byte [edi + 0x48], 1
mov byte [edi + 0x60], 0
jne 0x40159d
mov byte [edi + 0x60], 0
lea ecx, [esp + 0xc68]
push ecx
push 0x202
mov byte [edi + 0x60], 0
mov byte [edi + 0x28], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401603
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x37
add esi, 0xc
call fcn.00401270
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__DHCP_WSAStartup_Fail
push ebx
call edx
add esp, 0xc
mov ecx, edi
call fcn.00403160
mov eax, 0xfa4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xdf0]
xor ecx, esp
call fcn.0042c614
mov esp, ebp
pop ebp
ret 8
push 0
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
mov dword [edi + 0x24], eax
jne 0x40165f
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x3f
add esi, 0xc
call fcn.00401270
add esp, 4
push eax
mov eax, dword [esi]
push str._s:__DHCP_CreateEvent_Fail
push ebx
call eax
add esp, 0xc
mov ecx, edi
call fcn.00403160
mov eax, 0xfa4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xdf0]
xor ecx, esp
call fcn.0042c614
mov esp, ebp
pop ebp
ret 8
push 0
push 0
push edi
push 0x401d30
push 0
push 0
call dword [sym.imp.MSVCR80.dll__beginthreadex]
mov esi, eax
add esp, 0x18
test esi, esi
mov dword [esp + 0x14], esi
jne 0x4016c7
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x47
add esi, 0xc
call fcn.00401270
mov ecx, dword [esi]
add esp, 4
push eax
push str._s:__DHCP_Create_watch_thread_fail
push ebx
call ecx
add esp, 0xc
mov ecx, edi
call fcn.00403160
mov eax, 0xfa1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xdf0]
xor ecx, esp
call fcn.0042c614
mov esp, ebp
pop ebp
ret 8
mov dword [esp + 0x18], 0
nop
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push esi
call ebx
cmp eax, 0x102
jne 0x401cba
cmp byte [edi + 0x29], 0
jne 0x4016fc
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401c39
mov edx, dword [edi + 0x24]
push 0xffffffffffffffff
push edx
call ebx
cmp byte [edi + 0x29], 0
jne 0x401719
mov eax, dword [edi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x401c39
xor esi, esi
mov dword [esp + 0x28], 0xa
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
xor ebx, ebx
mov dword [esp + 0x10], esi
mov eax, dword [edi + 8]
test eax, eax
je 0x401808
mov ecx, dword [edi + 0xc]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x401808
mov eax, dword [edi + 8]
test eax, eax
je 0x40177b
mov ecx, dword [edi + 0xc]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x401785
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x30]
mov ecx, dword [edi + 8]
add ecx, dword [esp + 0x10]
xor eax, eax
test esi, esi
jbe 0x4017a2
mov edx, dword [ecx + 0x14]
cmp dword [esp + eax*4 + 0x34], edx
je 0x4017a2
add eax, 1
cmp eax, esi
jb 0x401795
cmp eax, esi
jne 0x4017c0
cmp esi, 0xfe
jae 0x4017c0
mov edx, dword [ecx + 0x14]
mov dword [esp + eax*4 + 0x34], edx
mov esi, dword [esp + 0x30]
add esi, 1
mov dword [esp + 0x30], esi
xor eax, eax
test esi, esi
jbe 0x4017dd
mov edx, dword [ecx + 0x18]
lea esp, [esp]
cmp dword [esp + eax*4 + 0x34], edx
je 0x4017dd
add eax, 1
cmp eax, esi
jb 0x4017d0
cmp eax, esi
jne 0x4017fb
cmp esi, 0xfe
jae 0x4017fb
mov ecx, dword [ecx + 0x18]
mov dword [esp + eax*4 + 0x34], ecx
mov esi, dword [esp + 0x30]
add esi, 1
mov dword [esp + 0x30], esi
add ebx, 1
add dword [esp + 0x10], 0x2c
jmp 0x401731
lea edx, [esp + 0x28]
push edx
xor esi, esi
push esi
push esi
lea eax, [esp + 0x3c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x401860
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [edi + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
call sub.Comn.dll_GetObjectLogPXE
mov ebx, eax
mov esi, dword [ebx]
push 0x71
add esi, 0xc
call fcn.00401270
mov edx, dword [esi]
add esp, 4
push eax
push str._s:__DHCP_select_socket_error
push ebx
call edx
add esp, 0xc
jmp 0x401c35
cmp eax, esi
mov dword [esp + 0x1c], esi
jle 0x401c2b
mov dword [esp + 0x10], esi
mov eax, dword [edi + 8]
test eax, eax
je 0x401c2b
mov ecx, dword [edi + 0xc]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jae 0x401c2b
mov eax, dword [edi + 8]
test eax, eax
je 0x4018ba
mov ecx, dword [edi + 0xc]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x4018c0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ebx, dword [edi + 8]
add ebx, dword [esp + 0x10]
cmp byte [ebx + 0x1d], 0
mov dword [esp + 0x24], ebx
jne 0x401be0
cmp byte [edi + 0x48], 1
je 0x401be0
mov ecx, dword [ebx + 0x18]
lea eax, [esp + 0x30]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4018fb
push 1
push edi
mov ecx, ebx
call fcn.004026c0
mov eax, dword [ebx + 0x14]
lea edx, [esp + 0x30]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je case.0x401b13.1
mov edx, dword [ebx + 0x14]
lea ecx, [esp + 0x430]
push ecx
push edx
lea esi, [esp + 0x470]
call fcn.00402660
test al, al
jne 0x40194a
mov eax, dword [edi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
cmp byte [esp + 0x55a], 0x61
jne 0x401a73
cmp byte [esp + 0x55b], 0x6d
jne 0x401a73
cmp byte [esp + 0x55c], 0x70
jne 0x401a73
cmp byte [esp + 0x55d], 0x78
jne 0x401a73
cmp byte [esp + 0x55e], 0x65
jne 0x401a73
push str.255.255.255.255
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x400
lea ecx, [esp + 0x86c]
push 0
push ecx
mov dword [esp + 0x440], eax
call sub.MSVCR80.dll_memset
mov edx, dword [str.ampxe]
mov ebx, dword [ebx + 0x14]
mov al, byte [0x4a621c]
add esp, 0xc
push 0x10
mov ecx, 0x3c
lea esi, [esp + 0x46c]
lea edi, [esp + 0x86c]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x434]
push ecx
push 0
mov dword [esp + 0x966], edx
push 0x1f4
lea edx, [esp + 0x878]
push edx
push ebx
mov byte [esp + 0x970], 0xee
mov byte [esp + 0x971], 5
mov byte [esp + 0x976], al
mov byte [esp + 0x977], 0xff
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x401a4e
call sub.Comn.dll_GetObjectLogPXE
mov edi, eax
mov esi, dword [edi]
push 0xab
add esi, 0xc
call fcn.00401270
add esp, 4
push eax
mov eax, dword [esi]
push str._s:__DP_Send_Packet_Error
push edi
call eax
add esp, 0xc
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
add dword [esp + 0x1c], 1
mov edi, dword [esp + 0x20]
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
cmp dword [esp + 0x434], 0
jne 0x401a8f
push str.255.255.255.255
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x434], eax
lea esi, [esp + 0x440]
lea edx, [esp + 0x468]
call fcn.0040b7a0
test al, al
je 0x40192d
mov ecx, dword [esp + 0x448]
mov dx, word [esp + 0x44c]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov esi, edi
mov word [eax + 4], dx
call fcn.00403910
test al, al
jne 0x40192d
cmp dword [esp + 0x440], 3
jne 0x401b00
cmp dword [edi + 0x44], 0
jne 0x401b00
mov eax, dword [edi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
mov eax, dword [esp + 0x444]
add eax, 0xffffffff
cmp eax, 7
ja case.0x401b13.1
jmp dword [eax*4 + 0x401cc8]
lea ecx, [esp + 0x430]
push ecx
mov ecx, ebx
lea edx, [esp + 0x444]
mov ebx, edi
call fcn.00402d10
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
lea edx, [esp + 0x440]
push edx
push edi
lea ecx, [esp + 0x438]
mov edx, ebx
call fcn.00402ed0
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
lea eax, [esp + 0x440]
mov esi, ebx
mov ecx, edi
call fcn.00402fe0
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
mov ecx, dword [esp + 0x24]
push edi
lea ebx, [esp + 0x434]
lea edx, [esp + 0x444]
call fcn.00403040
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
lea eax, [esp + 0x440]
mov esi, ebx
mov ecx, edi
call fcn.00403100
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
mov edx, dword [ebx + 0x14]
lea ecx, [esp + 0x30]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401bfc
push 0
push edi
mov ecx, ebx
call fcn.004026c0
mov ecx, dword [ebx + 0x18]
lea eax, [esp + 0x30]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je case.0x401b13.1
push 1
push edi
mov ecx, ebx
call fcn.004026c0
add dword [esp + 0x1c], 1
add dword [esp + 0x10], 0x2c
mov esi, dword [esp + 0x1c]
jmp 0x401870
mov edx, dword [edi + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov esi, dword [esp + 0x14]
cmp byte [edi + 0x28], 0
je 0x4016d0
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push esi
call ebx
cmp dword [esp + 0x18], 0
je 0x401c81
call sub.Comn.dll_GetObjectLogPXE
mov ecx, dword [esp + 0x18]
mov ebx, eax
mov esi, dword [ebx]
push ecx
push 0xe6
add esi, 0xc
call fcn.00401270
mov edx, dword [esi]
add esp, 4
push eax
push str._DHCP__s_DHCP_thread_code:_d
push ebx
call edx
add esp, 0x10
cmp byte [edi + 0x48], 1
je 0x401c8f
lea ebx, [edi + 0x2c]
call fcn.00406eb0
mov eax, dword [edi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0xdfc]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042c614
mov esp, ebp
pop ebp
ret 8
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x401c49