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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc5c
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0xc58], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x423
lea eax, [esp + 0x3d]
push ebx
push eax
mov byte [esp + 0x44], bl
call fcn.00407050
push 0x3ff
lea ecx, [esp + 0x471]
push ebx
push ecx
mov byte [esp + 0x478], bl
call fcn.00407050
push 0x3ff
lea edx, [esp + 0x87d]
push ebx
push edx
mov byte [esp + 0x884], bl
call fcn.00407050
lea eax, [esp + 0x884]
push eax
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], 0x400
call fcn.004022b0
add esp, 0x28
cmp eax, 1
jne 0x4028f0
mov ebx, dword [esp + 0x10]
mov eax, ebx
and eax, 0xf
je 0x4028bc
mov ecx, 0x10
sub ecx, eax
add ebx, ecx
lea edx, [esp + 0x860]
push edx
lea esi, [esp + 0x3c]
call fcn.00402680
add ebx, 0x24
add esp, 4
mov dword [esp + 0x10], ebx
call fcn.00402770
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402907
push str.set_socket_failed__n
call fcn.00401ae0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc58]
xor ecx, esp
call fcn.00403084
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [esp + 0x1a], eax
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov word [esp + 0x26], ax
mov eax, 2
push 0x415b20
mov word [esp + 0x1c], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
movzx ecx, word [0x415b14]
push ecx
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, word [0x415b1c]
inc edx
xor edi, edi
mov word [esp + 0x1a], ax
test edx, edx
jle 0x402a68
mov ecx, dword [esp + 0x10]
push 0x10
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
lea edx, [esp + 0x48]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x402a29
movzx esi, di
lea eax, [esi + 1]
push eax
push str.send_request_to_AD__already_sent__u_times.
call fcn.00401ae0
add esp, 8
cmp word [0x415b18], 0
jne 0x4029a8
imul esi, esi, 0x7d0
add esi, 0x3e8
push esi
jmp 0x4029ad
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov word [esp + 0x3a], ax
xor ecx, ecx
lea eax, [esp + 0x2c]
push eax
push ecx
mov word [esp + 0x34], cx
push 0x400
lea ecx, [esp + 0x470]
push ecx
push ebx
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x402a13
push 9
lea edx, [esp + 0x464]
push str.ADWATCHER
push edx
call fcn.00403a79
add esp, 0xc
test eax, eax
je 0x402a5b
movzx eax, word [0x415b1c]
inc edi
movzx ecx, di
inc eax
cmp ecx, eax
jl 0x402958
jmp 0x402a68
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.send_request_to_AD_control_failed__errorcode:_d
call fcn.00401ae0
add esp, 8
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc58]
xor ecx, esp
call fcn.00403084
mov esp, ebp
pop ebp
ret
push str.AD_control_accepts_the_request.
call fcn.00401ae0
add esp, 4
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0xc64]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00403084
mov esp, ebp
pop ebp
ret