Function at 0x5786f0
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58a468
mov eax, dword fs:[0]
push eax
mov eax, 0x287c
call fcn.00450720
mov eax, dword [0x5ed130]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2884], ecx
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x2884]
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp - 0x2884]
cmp dword [edx + 0x2c], 0xffffffff
jne 0x578758
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x578d22
mov dword [ebp - 0x283c], 0x1000
push 4
lea eax, [ebp - 0x283c]
push eax
push 0x1001
push 0xffff
mov ecx, dword [ebp - 0x2884]
mov edx, dword [ecx + 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0x283c], 0x7d0
push 4
lea eax, [ebp - 0x283c]
push eax
push 0x1006
push 0xffff
mov ecx, dword [ebp - 0x2884]
mov edx, dword [ecx + 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 2
mov word [ebp - 0x2838], ax
mov ecx, dword [ebp - 0x2884]
movzx edx, word [ecx + 0x50]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2836], ax
mov ecx, dword [ebp - 0x2884]
add ecx, 0x34
call fcn.00401700
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x2834], eax
call fcn.00401fe0
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x2884]
add ecx, 0x34
call fcn.00401700
push eax
push 0x5de468
mov eax, dword [0x5f9330]
push eax
call fcn.00567c70
push eax
call fcn.005679e0
add esp, 0x10
push 0x10
lea ecx, [ebp - 0x2838]
push ecx
mov edx, dword [ebp - 0x2884]
mov eax, dword [edx + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x5789f4
mov cl, byte [0x5db1b5]
mov byte [ebp - 0x2874], cl
xor edx, edx
mov dword [ebp - 0x2873], edx
mov dword [ebp - 0x286f], edx
mov dword [ebp - 0x286b], edx
mov dword [ebp - 0x2867], edx
mov word [ebp - 0x2863], dx
mov byte [ebp - 0x2861], dl
mov eax, dword [ebp - 0x2884]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x2884]
mov dword [edx + 0x2c], 0xffffffff
cmp dword [0x60387c], 0
jne 0x5788a6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x60387c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x60387c]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x2860], eax
mov edx, dword [ebp - 0x2860]
push edx
mov eax, dword [0x603878]
push eax
push 0x5de478
mov ecx, dword [0x5f9330]
push ecx
call fcn.00567c70
push eax
call fcn.005679e0
add esp, 0x14
mov edx, dword [0x603878]
add edx, 1
mov dword [0x603878], edx
cmp dword [0x603878], 0xa
jne 0x578953
mov eax, dword [ebp - 0x14]
movsx ecx, byte [eax + 0x2e4]
test ecx, ecx
jne 0x578953
lea edx, [ebp - 0x2878]
push edx
lea eax, [ebp - 0x2874]
push eax
call fcn.0057cd70
mov ecx, eax
call fcn.0057c9f0
movzx ecx, al
test ecx, ecx
je 0x57893a
movsx edx, byte [ebp - 0x2874]
test edx, edx
jne 0x578953
push 0
push 1
push 0x47a
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x514]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [ebp - 0x285c]
call fcn.00401550
mov dword [ebp - 4], 0
lea edx, [ebp - 0x285c]
push edx
call fcn.00575cc0
add esp, 4
lea ecx, [ebp - 0x285c]
call fcn.00401720
movzx eax, al
test eax, eax
jne 0x5789c5
lea ecx, [ebp - 0x285c]
push ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0x34
call fcn.00401620
push eax
mov ecx, dword [ebp - 0x2884]
add ecx, 0x34
call fcn.00401620
mov ecx, dword [ebp - 0x2884]
add ecx, 0x34
call fcn.00401700
push eax
call fcn.0057d3c0
add esp, 4
mov edx, dword [ebp - 0x14]
mov byte [edx + 7], 0
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 0x287d], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x285c]
call fcn.00401600
mov al, byte [ebp - 0x287d]
jmp 0x578d22
mov dword [0x60387c], 0
mov eax, dword [0x60387c]
mov dword [0x603878], eax
push 0x5de4a4
mov ecx, dword [0x5f9330]
push ecx
call fcn.00567c70
push eax
call fcn.005679e0
add esp, 0xc
mov byte [ebp - 0x283d], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x2884]
call fcn.00576500
movzx edx, byte [ebp - 0x283d]
test edx, edx
jne 0x578a74
mov ecx, 0x5fe824
call fcn.00401720
movzx eax, al
test eax, eax
jne 0x578a74
mov ecx, 0x5fe840
call fcn.00401720
movzx ecx, al
test ecx, ecx
jne 0x578a74
call fcn.005785c0
mov byte [ebp - 0x283d], 1
push 0
push 0x2800
mov edx, dword [0x5f9940]
push edx
mov eax, dword [ebp - 0x2884]
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x2828], eax
cmp dword [ebp - 0x2828], 0
jle 0x578cb9
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x2828]
mov dword [ebp - 0x18], edx
mov eax, dword [0x5f9940]
add eax, dword [ebp - 0x2828]
mov dword [0x5f9940], eax
cmp dword [ebp - 0x18], 0xc
jb 0x578cb7
push 0xf51b
mov ecx, dword [ebp - 0x18]
push ecx
push 0x5fe878
call fcn.005756e0
add esp, 0xc
mov dword [0x604be8], eax
cmp dword [0x604be8], 0
je 0x578ca1
mov edx, dword [0x604be8]
add edx, 2
mov dword [0x604be8], edx
mov eax, dword [0x604be8]
movzx ecx, word [eax]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0x2800
ja 0x578c6b
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x604be8]
lea edx, [ecx + eax - 4]
mov dword [0x604be4], edx
mov eax, dword [0x604be4]
add eax, 2
cmp eax, dword [0x5f9940]
jbe 0x578b4c
jmp 0x578cb7
mov ecx, dword [0x604be4]
movzx edx, word [ecx]
cmp edx, 0xf51b
jne 0x578c33
mov eax, dword [0x604be8]
add eax, 4
mov dword [0x604be8], eax
mov ecx, dword [0x604be8]
mov dl, byte [ecx]
mov byte [ebp - 0x2824], dl
mov eax, dword [0x604be8]
mov cl, byte [eax + 1]
mov byte [ebp - 0x2823], cl
push 0x2800
lea edx, [ebp - 0x2820]
push edx
mov eax, dword [ebp - 0x10]
sub eax, 0xc
push eax
mov ecx, dword [0x604be8]
add ecx, 2
push ecx
call fcn.005677d0
add esp, 0x10
mov word [ebp - 0x2822], ax
mov edx, dword [ebp - 0x14]
add edx, 0x560
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x2824]
push eax
call fcn.00401fe0
add eax, 0x164
mov ecx, eax
call fcn.00414be0
mov ecx, dword [ebp - 0x14]
add ecx, 0x560
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [0x604be4]
add edx, 2
mov dword [0x604be4], edx
mov eax, dword [0x5f9940]
sub eax, dword [0x604be4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
add ecx, 0x5fe878
mov dword [0x5f9940], ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [0x604be4]
push eax
push 0x5fe878
call fcn.0043dec0
add esp, 0xc
jmp 0x578c69
mov ecx, dword [0x5f9940]
sub ecx, dword [0x604be8]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
add edx, 0x5fe878
mov dword [0x5f9940], edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [0x604be8]
push ecx
push 0x5fe878
call fcn.0043dec0
add esp, 0xc
jmp 0x578c9f
mov edx, dword [0x5f9940]
sub edx, dword [0x604be8]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
add eax, 0x5fe878
mov dword [0x5f9940], eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [0x604be8]
push edx
push 0x5fe878
call fcn.0043dec0
add esp, 0xc
jmp 0x578cb2
mov dword [0x5f9940], 0x5fe878
mov dword [ebp - 0x18], 0
jmp 0x578ac1
jmp 0x578d11
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x287c], eax
mov eax, dword [ebp - 0x287c]
mov dword [ebp - 0x2888], eax
cmp dword [ebp - 0x2888], 0
je 0x578ce8
cmp dword [ebp - 0x2888], 0x274c
je 0x578cf0
jmp 0x578cf2
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x578d11
mov ecx, dword [ebp - 0x2884]
call fcn.00575970
call fcn.00576b80
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x578d22
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + 6]
test edx, edx
jne 0x578a30
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0043dd0c
mov esp, ebp
pop ebp
ret