Function at 0x10042c40
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x548
mov eax, dword [0x100f7084]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x510], ecx
mov dword [ebp - 0x548], 0x3a98
mov dword [ebp - 0x51c], 0
mov byte [ebp - 0x50c], 0x2a
mov byte [ebp - 0x50b], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x520], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x53c], eax
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov ecx, 1
test ecx, ecx
je 0x1004311b
mov edx, dword [ebp - 0x510]
movzx eax, byte [edx + 0xad]
test eax, eax
jne 0x10042ccb
mov ecx, dword [ebp - 0x510]
movzx edx, byte [ecx + 0xac]
test edx, edx
je 0x10042cd0
jmp 0x1004311b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x520]
cmp eax, 0x3a98
jbe 0x10042dfe
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x520], eax
mov eax, 1
imul ecx, eax, 0
mov byte [ebp + ecx - 0x50c], 0x2a
mov dword [ebp - 0x524], 1
cmp dword [ebp - 0x524], 2
jae 0x10042d18
jmp 0x10042d1d
call fcn.10086d4a
mov edx, dword [ebp - 0x524]
mov byte [ebp + edx - 0x50c], 0
push 2
lea eax, [ebp - 0x50c]
push eax
call fcn.10043c50
add esp, 8
push 0
push 2
lea ecx, [ebp - 0x50c]
push ecx
mov edx, dword [ebp - 0x510]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x52c], eax
cmp dword [ebp - 0x52c], 0
jg 0x10042dfe
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x510]
call fcn.10043d60
movzx edx, al
test edx, edx
je 0x10042da4
mov eax, dword [ebp - 0x510]
movzx ecx, byte [eax + 0xac]
test ecx, ecx
jne 0x10042da4
mov dword [ebp - 0x528], 1
jmp 0x10042dae
mov dword [ebp - 0x528], 0
mov edx, dword [ebp - 0x528]
mov dword [ebp - 0x51c], edx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10042df9
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042df9
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x52c]
push eax
push 0x100cf4b8
push 3
push 0x2e0
push 0x100cf4a4
call dword [0x100fa800]
add esp, 0x18
jmp 0x1004311b
mov dword [ebp - 0x508], 0
mov dword [ebp - 0x518], 0
jmp 0x10042e23
mov ecx, dword [ebp - 0x518]
add ecx, 1
mov dword [ebp - 0x518], ecx
mov edx, dword [ebp - 0x518]
cmp edx, dword [ebp - 0x508]
jae 0x10042e4d
mov eax, dword [ebp - 0x518]
mov ecx, dword [ebp - 0x510]
mov edx, dword [ebp + eax*4 - 0x504]
cmp edx, dword [ecx + 0x44]
jne 0x10042e4b
jmp 0x10042e4d
jmp 0x10042e14
mov eax, dword [ebp - 0x518]
cmp eax, dword [ebp - 0x508]
jne 0x10042e89
cmp dword [ebp - 0x508], 0x40
jae 0x10042e89
mov ecx, dword [ebp - 0x518]
mov edx, dword [ebp - 0x510]
mov eax, dword [edx + 0x44]
mov dword [ebp + ecx*4 - 0x504], eax
mov ecx, dword [ebp - 0x508]
add ecx, 1
mov dword [ebp - 0x508], ecx
xor edx, edx
jne 0x10042e08
mov dword [ebp - 0x544], 3
mov dword [ebp - 0x540], 0
lea eax, [ebp - 0x544]
push eax
push 0
push 0
lea ecx, [ebp - 0x508]
push ecx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x514], eax
cmp dword [ebp - 0x514], 0
jne 0x10042f8a
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x53c]
cmp eax, 0xafc8
jbe 0x10042f85
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x510]
call fcn.10043d60
movzx eax, al
test eax, eax
je 0x10042f2b
mov ecx, dword [ebp - 0x510]
movzx edx, byte [ecx + 0xac]
test edx, edx
jne 0x10042f2b
mov dword [ebp - 0x530], 3
jmp 0x10042f35
mov dword [ebp - 0x530], 0
mov eax, dword [ebp - 0x530]
mov dword [ebp - 0x51c], eax
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10042f80
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10042f80
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x514]
push ecx
push 0x100cf5b8
push 3
push 0x2f4
push 0x100cf5a4
call dword [0x100fa800]
add esp, 0x18
jmp 0x1004311b
jmp 0x10042c9c
cmp dword [ebp - 0x514], 0
jge 0x1004302b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x510]
call fcn.10043d60
movzx eax, al
test eax, eax
je 0x10042fd1
mov ecx, dword [ebp - 0x510]
movzx edx, byte [ecx + 0xac]
test edx, edx
jne 0x10042fd1
mov dword [ebp - 0x534], 2
jmp 0x10042fdb
mov dword [ebp - 0x534], 0
mov eax, dword [ebp - 0x534]
mov dword [ebp - 0x51c], eax
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x10043026
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10043026
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x514]
push ecx
push 0x100cf650
push 3
push 0x300
push 0x100cf6a0
call dword [0x100fa800]
add esp, 0x18
jmp 0x1004311b
mov byte [ebp - 0x404], 0
push 0x3ff
push 0
lea edx, [ebp - 0x403]
push edx
call fcn.1009ee30
add esp, 0xc
push 0
push 0x400
lea eax, [ebp - 0x404]
push eax
mov ecx, dword [ebp - 0x510]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x514], eax
cmp dword [ebp - 0x514], 0
jg 0x1004310a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x510]
call fcn.10043d60
movzx edx, al
test edx, edx
je 0x100430b3
mov eax, dword [ebp - 0x510]
movzx ecx, byte [eax + 0xac]
test ecx, ecx
jne 0x100430b3
mov dword [ebp - 0x538], 3
jmp 0x100430bd
mov dword [ebp - 0x538], 0
mov edx, dword [ebp - 0x538]
mov dword [ebp - 0x51c], edx
call dword [0x100fa7f0]
movzx eax, al
test eax, eax
je 0x10043108
call dword [0x100fa7f8]
cmp eax, 3
jg 0x10043108
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x514]
push eax
push 0x100cf6f0
push 3
push 0x30b
push 0x100cf73c
call dword [0x100fa800]
add esp, 0x18
jmp 0x1004311b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x53c], eax
jmp 0x10042c9c
mov ecx, dword [ebp - 0x510]
movzx edx, byte [ecx + 0xad]
test edx, edx
jne 0x10043141
mov eax, dword [ebp - 0x510]
movzx ecx, byte [eax + 0xac]
test ecx, ecx
je 0x100431dd
mov edx, dword [ebp + 8]
mov dword [edx], 0
mov dword [ebp - 0x51c], 0
mov eax, 1
imul ecx, eax, 0
mov byte [ebp + ecx - 0x50c], 0x2a
mov edx, 1
shl edx, 0
mov byte [ebp + edx - 0x50c], 1
push 2
lea eax, [ebp - 0x50c]
push eax
call fcn.10043c50
add esp, 8
push 0
push 2
lea ecx, [ebp - 0x50c]
push ecx
mov edx, dword [ebp - 0x510]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_send]
call dword [0x100fa7f0]
movzx ecx, al
test ecx, ecx
je 0x100431d2
call dword [0x100fa7f8]
cmp eax, 1
jg 0x100431d2
push str._MASTER
push 1
push 0x31e
push 0x100cf7c4
call dword [0x100fa800]
add esp, 0x10
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x51c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10086b0f
mov esp, ebp
pop ebp
ret 4