Function at 0x1001d85b
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
push ebx
push edi
xor eax, eax
lea edi, [ebp - 0x1a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 2
pop eax
mov word [ebp - 0x1c], ax
lea eax, [ebp - 1]
push eax
push dword [esi + 0x18]
xor eax, eax
inc eax
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001dacc
movzx eax, byte [ebp - 1]
lea ecx, [ebp - 0x228]
push ecx
push dword [esi + 0x18]
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001dacc
xor al, al
cmp byte [ebp - 1], al
jbe 0x1001d8cb
movzx ecx, al
mov bl, byte [ebp + ecx - 0x228]
test bl, bl
je 0x1001d8ce
inc al
cmp al, byte [ebp - 1]
jb 0x1001d8b4
jmp 0x1001d8ce
mov bl, byte [ebp - 1]
cmp al, byte [ebp - 1]
jne 0x1001d8d6
or bl, 0xff
push 0
push 2
lea eax, [ebp - 0xc]
push eax
push dword [esi + 0x18]
mov byte [ebp - 0xc], 5
mov byte [ebp - 0xb], bl
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 2
jne 0x1001dac7
test bl, bl
je 0x1001d903
push 0x57
pop edi
jmp 0x1001dacc
lea eax, [ebp - 0x128]
push eax
push dword [esi + 0x18]
push 4
pop ebx
mov eax, ebx
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001dacc
cmp byte [ebp - 0x128], 5
mov dword [ebp - 8], ebx
jne 0x1001d973
cmp byte [ebp - 0x127], 1
jne 0x1001d973
cmp byte [ebp - 0x125], 1
je 0x1001d97b
cmp byte [ebp - 0x125], 3
jne 0x1001d973
lea eax, [ebp - 0x124]
push eax
push dword [esi + 0x18]
xor eax, eax
inc eax
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001daa6
mov dword [ebp - 8], 5
cmp byte [ebp - 0x124], al
jne 0x1001d9f1
push 0x57
pop edi
jmp 0x1001daa6
lea eax, [ebp - 0x124]
push eax
push dword [esi + 0x18]
push 6
pop eax
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001daa6
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x18], eax
mov ax, word [ebp - 0x120]
mov dword [ebp - 8], 0xa
push 6
push 1
push 2
mov word [ebp - 0x1a], ax
call dword [sym.imp.WS2_32.dll_socket]
lea ebx, [esi + 0x1c]
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x1001da8d
push 0x10
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1001da95
push ebx
call fcn.1001dc3f
mov edi, 0x4d0
jmp 0x1001da95
movzx eax, byte [ebp - 0x124]
lea ecx, [ebp - 0x123]
push ecx
push dword [esi + 0x18]
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001daa6
movzx eax, byte [ebp - 0x124]
lea ecx, [eax + 5]
mov byte [ebp + eax - 0x123], 0
lea eax, [ebp - 0x123]
push eax
mov dword [ebp - 8], ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
movzx eax, byte [ebp - 0x124]
lea eax, [ebp + eax - 0x123]
push eax
push dword [esi + 0x18]
push 2
pop eax
call fcn.1001e2f4
mov edi, eax
test edi, edi
jne 0x1001da95
add dword [ebp - 8], 2
test ebx, ebx
je 0x1001d9e7
cmp word [ebx + 8], 2
jne 0x1001d9e7
cmp word [ebx + 0xa], 4
jne 0x1001d9e7
mov eax, dword [ebx + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp - 0x124]
mov ax, word [ebp + eax - 0x123]
jmp 0x1001d9ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp - 8], 0
je 0x1001dacc
mov byte [ebp - 0x127], 0
test edi, edi
je 0x1001daad
mov byte [ebp - 0x127], 3
push 0
push dword [ebp - 8]
lea eax, [ebp - 0x128]
push eax
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp - 8]
je 0x1001dacc
mov edi, 0x4d4
mov eax, edi
pop edi
pop ebx
leave
ret