Function at 0x10012900
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
push 0x20
push 0
lea eax, [ebp - 0x80]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x80], 8
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x7c], 0
movzx ecx, word [ebp + 0xc]
push ecx
push 0x1004d644
push 8
lea edx, [ebp - 0x60]
push edx
call fcn.10019db0
add esp, 0x10
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x5b
jne 0x10012a06
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x8c], 1
jmp 0x10012989
mov edx, dword [ebp - 0x88]
add edx, 1
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x8c]
add eax, 1
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x8c]
movsx edx, byte [ecx]
test edx, edx
je 0x100129f9
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x8c]
movsx ecx, byte [eax]
cmp ecx, 0x5d
je 0x100129f9
cmp dword [ebp - 0x88], 0x40
jge 0x100129f9
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0x88]
mov cl, byte [edx]
mov byte [ebp + eax - 0x58], cl
push 3
push 0x1004d648
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x8c]
push edx
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x100129f4
mov eax, dword [ebp - 0x8c]
add eax, 2
mov dword [ebp - 0x8c], eax
jmp 0x1001296b
mov ecx, dword [ebp - 0x88]
mov byte [ebp + ecx - 0x58], 0
jmp 0x10012a18
push 0x40
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x58]
push eax
call sub.msvcrt.dll_strncpy
add esp, 0xc
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x84]
push ecx
lea edx, [ebp - 0x80]
push edx
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x58]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10012a63
lea edx, [ebp - 0x60]
push edx
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.getaddrinfo___error_:__d_tmp_host_s_port_str_s
mov edx, dword [ebp - 8]
push edx
call main
add esp, 0x14
or eax, 0xffffffff
jmp 0x10012b79
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x84]
mov dword [ebp - 4], eax
jmp 0x10012a7e
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x10012b13
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x10012aae
jmp 0x10012a75
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
movzx edx, word [ecx]
cmp edx, 0x17
jne 0x10012ada
cmp dword [ebp + 0x10], 0
jbe 0x10012ada
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x90], ecx
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp + 0x10]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jge 0x10012b0c
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x10012a75
jmp 0x10012b13
mov ecx, dword [ebp - 0x84]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0xc], 0
jge 0x10012b4b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket
push 0x1004d68c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call main
add esp, 0x10
or eax, 0xffffffff
jmp 0x10012b79
cmp dword [ebp - 8], 0
jge 0x10012b76
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.connect
push 0x1004d6b4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call main
add esp, 0x10
or eax, 0xffffffff
jmp 0x10012b79
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret