Function at 0x1002acb0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns

Disassembly:
push ebx
mov ebx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov eax, dword [ebp + 8]
sub eax, 0
je 0x1002add7
dec eax
je 0x1002ad82
sub eax, 3
jne 0x1002ae40
lea esi, [ebp + 0xe]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edi, [ebx + 0x10]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x1002ad16
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1002acff
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edx, ecx
shr ecx, 2
mov esi, dword [eax]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [ebp + 0xc]
mov ebp, dword [sym.imp.WS2_32.dll_htons]
push eax
call ebp
mov esi, dword [esp + 0x14]
mov word [ebx + 0xe], ax
push esi
mov word [ebx + 0xc], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edi, [ebx + 0x20]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x1002ad6c
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1002ad55
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
shr ecx, 2
mov esi, dword [edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
push ecx
call ebp
mov word [ebx + 0x1e], ax
mov word [ebx + 0x1c], 2
jmp 0x1002ae40
lea esi, [ebp + 0xe]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edi, [ebx + 0x10]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x1002adc0
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1002ada9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
shr ecx, 2
mov esi, dword [edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 0xe], ax
mov word [ebx + 0xc], 2
jmp 0x1002ae40
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.WS2_32.dll_inet_addr]
lea edi, [ebx + 0x10]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x1002ae16
push ebp
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1002adff
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, ecx
shr ecx, 2
mov esi, dword [edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.WS2_32.dll_htons]
and esi, 0xffff
mov word [ebx + 0xe], ax
push esi
push ebp
push str._CONNSOCK:_Svr__s_Port__i
mov word [ebx + 0xc], 2
call fcn.10001000
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1002ae5a
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x1c]
push 0x35
push ecx
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1002ae81
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._CONNSOCK:_WSAEventSelect_Fail._Err___i
call fcn.10001000
add esp, 8
add ebx, 0xc
push 0x10
push ebx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret