Function at 0x1001219
Capabilities:
Connect socket
Get hostname
Receive data
Receive data on socket
Resolve dns

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x534
mov eax, dword [0x100305c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push 0x40
push eax
mov dword [ebp - 0x510], eax
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x100126e
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x1001267
lea esi, [ebp - 0x108]
jmp 0x1001272
xor eax, eax
jmp 0x100147f
mov byte [esi], 0
inc esi
xor eax, eax
cmp byte [esi], al
je 0x100147f
push ebx
push edi
push 8
pop ecx
push 2
pop ebx
lea edi, [ebp - 0x534]
rep stosd dword es:[edi], eax
and dword [ebp - 0x530], eax
lea eax, [ebp - 0x514]
push eax
lea eax, [ebp - 0x534]
push eax
xor edi, edi
push 0x100116c
inc edi
push esi
mov dword [ebp - 0x534], ebx
mov dword [ebp - 0x52c], edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x50c], eax
test eax, eax
je 0x10012f1
cmp eax, 0x277d
je 0x10012dd
push esi
push 0x2710
push edi
call fcn.01001c91
add esp, 0xc
jmp 0x10012ea
push 0x2712
push ebx
call fcn.01001c91
pop ecx
pop ecx
mov eax, edi
jmp 0x100147d
mov eax, dword [ebp - 0x514]
push dword [eax + 0x14]
push 0x2714
push edi
call fcn.01001c91
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.msvcrt.dll_fflush]
mov esi, dword [ebp - 0x514]
add esp, 0x10
test esi, esi
je 0x1001373
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1001345
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x50c], eax
jmp 0x100136a
push dword [esi + 0x10]
push dword [esi + 0x18]
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1001379
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
mov dword [ebp - 0x50c], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x1001321
jmp 0x1001379
mov ebx, dword [ebp - 0x510]
push dword [ebp - 0x514]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor edi, edi
cmp esi, edi
jne 0x10013ac
push dword [ebp - 0x50c]
cmp ebx, 0xffffffff
jne 0x100139d
push 0x2715
jmp 0x10013a2
push 0x2717
call fcn.01001d21
jmp 0x100147a
cmp dword [0x1003080], edi
je 0x10013c6
push edi
push 3
push 0x1001168
push ebx
call fcn.01001d6c
test eax, eax
jl 0x10013fc
mov eax, dword [ebp - 0x510]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10013cf
push edi
sub eax, edx
push eax
push dword [ebp - 0x510]
push ebx
call fcn.01001d6c
test eax, eax
jl 0x10013fc
push edi
push 2
push 0x1001164
push ebx
call fcn.01001d6c
test eax, eax
jge 0x100140f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2719
call fcn.01001d21
jmp 0x1001473
mov esi, dword [sym.imp.WS2_32.dll_recv]
push edi
mov edi, 0x3ff
push edi
lea eax, [ebp - 0x508]
push eax
push ebx
call esi
test eax, eax
jle 0x1001459
mov byte [ebp + eax - 0x508], 0
lea eax, [ebp - 0x508]
push eax
push 0x1001160
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
push 0
push edi
lea eax, [ebp - 0x508]
push eax
push ebx
call esi
test eax, eax
jg 0x100142a
jmp 0x100146a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2718
call fcn.01001d21
push 0xa
call dword [sym.imp.msvcrt.dll_putchar]
pop ecx
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
inc eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0100180c
leave
ret 4