Function at 0x1002ad80
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, 0x524
mov eax, dword [0x100ab080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, ecx
push edi
mov dword [ebp - 0x50c], eax
xor edi, edi
mov word [ebp - 0x510], 0x2a
call esi
mov dword [ebp - 0x518], eax
call esi
mov dword [ebp - 0x51c], eax
mov eax, dword [ebp - 0x50c]
mov dword [eax], edi
cmp byte [ebx + 0xad], 0
jne 0x1002b12d
nop word [eax + eax]
cmp byte [ebx + 0xac], 0
jne 0x1002af29
call esi
sub eax, dword [ebp - 0x518]
cmp eax, 0x3a98
jbe 0x1002ae2f
call esi
push 0
mov dword [ebp - 0x518], eax
lea eax, [ebp - 0x510]
push 2
push eax
push dword [ebx + 0x44]
mov word [ebp - 0x510], 0xf8ce
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x514], eax
test eax, eax
jle 0x1002af60
mov eax, dword [ebx + 0x44]
mov dword [ebp - 0x504], eax
lea eax, [ebp - 0x524]
push eax
push 0
push 0
lea eax, [ebp - 0x508]
mov dword [ebp - 0x508], 1
push eax
push 0
mov dword [ebp - 0x524], 3
mov dword [ebp - 0x520], edi
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x514], eax
test eax, eax
jne 0x1002aed3
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
sub eax, dword [ebp - 0x51c]
cmp eax, 0xafc8
jbe 0x1002af1c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002afdf
cmp byte [ebx + 0xac], 0
jne 0x1002afdf
mov edi, 3
jmp 0x1002afe1
js 0x1002b0aa
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.10068810
add esp, 0xc
lea eax, [ebp - 0x404]
push 0
push 0x400
push eax
push dword [ebx + 0x44]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x514], eax
test eax, eax
jle 0x1002b027
call esi
mov dword [ebp - 0x51c], eax
cmp byte [ebx + 0xad], 0
je 0x1002ade0
xor edi, edi
mov eax, dword [ebp - 0x50c]
cmp byte [ebx + 0xad], 0
jne 0x1002b12d
cmp byte [ebx + 0xac], 0
jne 0x1002b12d
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1006636c
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002af97
cmp byte [ebx + 0xac], 0
jne 0x1002af97
mov edi, 1
jmp 0x1002af99
xor edi, edi
call dword [0x101250b4]
test al, al
je 0x1002af2b
call dword [0x101250b0]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af31
push dword [eax]
push dword [ebp - 0x514]
push 0x1009c488
push 3
push 0x2e6
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x18
jmp 0x1002af2b
xor edi, edi
call dword [0x101250b4]
test al, al
je 0x1002af2b
call dword [0x101250b0]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af31
push dword [eax]
push 0
push 0x1009c4d8
push 3
push 0x2fa
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x18
jmp 0x1002af2b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002b05e
cmp byte [ebx + 0xac], 0
jne 0x1002b05e
mov edi, 3
jmp 0x1002b060
xor edi, edi
call dword [0x101250b4]
test al, al
je 0x1002af2b
call dword [0x101250b0]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af31
push dword [eax]
push dword [ebp - 0x514]
push 0x1009c570
push 3
push 0x311
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x18
jmp 0x1002af2b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x50c]
lea esi, [ebx + 0x28]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
je 0x1002b0e1
cmp byte [ebx + 0xac], 0
jne 0x1002b0e1
mov edi, 2
jmp 0x1002b0e3
xor edi, edi
call dword [0x101250b4]
test al, al
je 0x1002af2b
call dword [0x101250b0]
cmp eax, 3
mov eax, dword [ebp - 0x50c]
jg 0x1002af31
push dword [eax]
push dword [ebp - 0x514]
push 0x1009c520
push 3
push 0x306
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x18
jmp 0x1002af2b
push 0
mov dword [eax], 0
lea eax, [ebp - 0x510]
push 2
push eax
push dword [ebx + 0x44]
mov word [ebp - 0x510], 0xf7ce
call dword [sym.imp.WS2_32.dll_send]
call dword [0x101250b4]
test al, al
je 0x1002b17f
call dword [0x101250b0]
cmp eax, 1
jg 0x1002b17f
push str._MASTER
push 1
push 0x324
push str.acc_socks5agent.cpp
call dword [0x101250b8]
add esp, 0x10
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1006636c
mov esp, ebp
pop ebp
ret 4