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

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x1ac
push esi
push 0x40
push dword [ebp + 0x7c]
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x100116b
push 0x104
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x1001164
lea esi, [ebp - 0x138]
jmp 0x100116f
xor eax, eax
jmp 0x1001390
and byte [esi], 0
inc esi
xor eax, eax
cmp byte [esi], al
je 0x1001390
push ebx
push edi
push 8
pop ecx
push 2
lea edi, [ebp + 0x4c]
rep stosd dword es:[edi], eax
and dword [ebp + 0x50], eax
pop edi
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x4c]
push eax
xor ebx, ebx
push 0x10010e4
inc ebx
push esi
mov dword [ebp + 0x4c], edi
mov dword [ebp + 0x54], ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x10011cd
cmp eax, 0x277d
je 0x10011c5
push esi
push 0x2710
push ebx
call fcn.01001632
add esp, 0xc
jmp 0x100138c
push 0x2712
push edi
jmp 0x100122f
push 0x20
pop ecx
xor eax, eax
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x6c]
mov ecx, dword [eax + 0x18]
mov cx, word [ecx]
push 0
push ebx
mov word [ebp - 0x34], cx
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
xor esi, esi
cmp edi, esi
jge 0x1001206
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2715
jmp 0x1001241
mov eax, dword [ebp + 0x6c]
push dword [eax + 0x10]
lea eax, [ebp - 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x100124b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2742
jne 0x100123b
push 0x2713
push 2
call fcn.01001632
pop ecx
pop ecx
jmp 0x100138c
push eax
push 0x2716
call fcn.010016a1
jmp 0x100138c
mov eax, dword [ebp + 0x6c]
push dword [eax + 0x14]
push 0x2714
push ebx
call fcn.01001632
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.msvcrt.dll_fflush]
mov eax, dword [ebp + 0x6c]
add esp, 0x10
push dword [eax + 0x10]
push dword [eax + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x1001290
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2717
jmp 0x10012e6
cmp dword [0x1002060], esi
je 0x10012aa
push esi
push 3
push 0x10010e0
push edi
call fcn.010016e0
test eax, eax
jl 0x10012da
mov eax, dword [ebp + 0x7c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10012b0
push esi
sub eax, edx
push eax
push dword [ebp + 0x7c]
push edi
call fcn.010016e0
test eax, eax
jl 0x10012da
push esi
push 2
push 0x10010dc
push edi
call fcn.010016e0
test eax, eax
jge 0x10012f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2719
call fcn.010016a1
jmp 0x1001385
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
jmp 0x1001355
cmp byte [ebp + 0x73], 0x88
jb 0x100131b
cmp byte [ebp + 0x73], 0x8a
jbe 0x1001317
cmp byte [ebp + 0x73], 0x8c
je 0x1001317
cmp byte [ebp + 0x73], 0x8d
jne 0x100131b
mov byte [ebp + 0x73], 0xa
jmp 0x100131b
add byte [ebp + 0x73], 0x80
movzx eax, byte [ebp + 0x73]
push eax
mov dword [ebp + 0x7c], eax
call dword [sym.imp.msvcrt.dll_isprint]
test eax, eax
pop ecx
jne 0x1001347
movzx eax, byte [ebp + 0x73]
push eax
call dword [sym.imp.msvcrt.dll_isspace]
test eax, eax
pop ecx
jne 0x1001347
movzx eax, byte [ebp + 0x73]
xor eax, 0x64
jmp 0x100134b
movzx eax, byte [ebp + 0x73]
push eax
call dword [sym.imp.msvcrt.dll_putchar]
pop ecx
push 0
push ebx
lea eax, [ebp + 0x73]
push eax
push edi
call esi
cmp eax, ebx
je 0x10012f9
test eax, eax
jge 0x1001376
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2718
call fcn.010016a1
cmp dword [ebp + 0x7c], 0xa
je 0x1001385
push 0xa
call dword [sym.imp.msvcrt.dll_putchar]
pop ecx
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, ebx
pop ebx
pop esi
add ebp, 0x74
leave
ret 4