Function at 0x10004280
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
mov eax, 0x28bc
call fcn.1000d600
push ebx
push ebp
push esi
lea eax, [esp + 0x24]
push edi
push eax
push 0x101
mov ebp, ecx
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x100044dd
mov eax, dword [esp + 0x28d4]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x100042ba
mov eax, dword [eax + 4]
jmp 0x100042c8
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x100044dd
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x100042d1
mov eax, 0x10019280
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
test esi, esi
je 0x100044dd
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
push 0x50
mov dword [esp + 0x14], ebx
mov word [esp + 0x1c], 2
call sub.WS2_32.dll_htons
mov word [esp + 0x1a], ax
mov ecx, dword [esi + 0xc]
push 0x10
mov edx, dword [ecx]
lea ecx, [esp + 0x1c]
push ecx
push ebx
mov eax, dword [edx]
mov dword [esp + 0x28], eax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x100044d7
mov edx, dword [esp + 0x28d0]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
push edx
push ebx
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x100044d7
mov edi, 0x1014d5f0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x10004367
call fcn.1000c850
mov eax, dword [ebp + 4]
test eax, eax
je 0x1000438d
mov cl, byte [eax - 1]
test cl, cl
je 0x1000438d
cmp cl, 0xff
je 0x1000438d
test ebx, ebx
jne 0x100043b1
dec cl
push ebx
mov byte [eax - 1], cl
mov ecx, ebp
call fcn.10002ea0
jmp 0x100043db
test ebx, ebx
jne 0x1000439c
push 1
mov ecx, ebp
call fcn.10002ea0
jmp 0x100043db
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x100043a8
cmp eax, ebx
jae 0x100043b9
push 1
mov ecx, ebp
call fcn.10002ea0
mov ecx, ebp
push ebx
call fcn.10003a80
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x1014d5f0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ebx + eax], 0
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1bc]
push 0x2710
push ecx
push edx
call sub.WS2_32.dll_recv
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
jle 0x10004408
mov byte [esp + esi + 0x1b8], 0
jmp 0x10004410
mov byte [esp + 0x1b8], 0
lea edi, [esp + 0x1b8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp + 8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
or eax, 0xffffffff
mov edi, ecx
sub eax, edx
cmp eax, edi
ja 0x10004434
call fcn.1000c850
test edi, edi
jbe 0x100044bd
mov ebx, dword [ebp + 8]
add ebx, edi
cmp ebx, 0xfffffffd
jbe 0x1000444b
call fcn.1000c850
mov eax, dword [ebp + 4]
test eax, eax
je 0x10004471
mov cl, byte [eax - 1]
test cl, cl
je 0x10004471
cmp cl, 0xff
je 0x10004471
test ebx, ebx
jne 0x10004488
dec cl
push ebx
mov byte [eax - 1], cl
mov ecx, ebp
call fcn.10002ea0
jmp 0x100044bd
test ebx, ebx
jne 0x10004483
test eax, eax
je 0x100044bd
push ebx
mov ecx, ebp
call fcn.10002fe0
jmp 0x100044bd
cmp dword [ebp + 0xc], ebx
jae 0x10004490
mov ecx, ebp
push ebx
call fcn.10003a80
mov edx, dword [ebp + 4]
mov ecx, edi
mov edi, dword [ebp + 8]
lea esi, [esp + 0x1b8]
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x14]
mov dword [ebp + 8], ebx
mov byte [ebx + eax], 0
test esi, esi
jg 0x100043db
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x28bc
ret 8
push ebx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28bc
ret 8