Function at 0x201a1c
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get hostname
Initialize winsock library
Resolve dns
Set socket configuration
Terminate process

Disassembly:
push esi
push edi
sub esp, 0x448
test eax, eax
jne 0x201a29
dec eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], 0
xchg ch, cl
mov ebx, ecx
lea edx, [esp]
call fcn.00202d0c
lea edx, [esp + 0x224]
call fcn.00202d0c
sub esp, 0x190
push esp
push 2
call dword [sym.imp.WSOCK32.DLL_WSAStartup]
mov cl, byte [esp]
add esp, 0x190
test eax, eax
jne 0x201c52
cmp cl, 2
jne 0x201c52
mov ax, word [ebp - 0x46]
test ax, ax
js 0x201c4e
call fcn.00202aae
jae 0x201c4a
mov ecx, 0x10044
call fcn.0020299c
jb 0x201c54
mov dword [ebp - 0x64], edx
call fcn.00202aec
jb 0x201c54
cld
xor eax, eax
mov ecx, 0x20
push edi
add edi, 4
rep stosw word es:[edi], ax
pop edi
mov ax, word [ebp - 0x46]
mov ecx, dword [ebp - 0x6c]
mov word [edi + 4], ax
mov word [edi + 0xa], 2
mov word [edi + 0xc], 0x40
mov word [edi + 0xe], 0xc0
mov dword [edi + 0x1c], 0x10000
mov dword [edi + 0x30], ebx
mov dword [edi + 0x38], ecx
test ebx, ebx
js 0x201aed
jmp 0x201b0f
lea eax, [esp + 0x228]
push 0x2013fc
push eax
call dword [sym.imp.WSOCK32.DLL_getservbyname]
test eax, eax
je 0x201c2e
movzx eax, word [eax + 8]
mov dword [edi + 0x30], eax
lea eax, [esp + 4]
push eax
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x201c2e
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [edi + 0x34], eax
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.DLL_socket]
cmp eax, 0xffffffff
je 0x201c2e
mov dword [edi + 6], eax
push 1
mov edx, esp
push 4
push edx
push 0xffffff7f
push 0xffff
push eax
call dword [sym.imp.WSOCK32.DLL_setsockopt]
pop edx
test eax, eax
jne 0x201c2e
push 0x100
lea eax, [esp + 8]
push eax
call dword [sym.imp.WSOCK32.DLL_gethostname]
test eax, eax
jne 0x201c2e
lea eax, [esp + 3]
lea edx, [eax + 1]
inc eax
test byte [eax], 0xff
jne 0x201b84
sub eax, edx
cmp eax, 0x100
jb 0x201b98
mov eax, 0x100
mov dword [esp], eax
test dword [ebp - 0x68], 0xffffffff
jne 0x201bc9
push 0
push 0
push dword [edi + 0x34]
push word [edi + 0x30]
push 2
mov eax, esp
push 0x10
push eax
push dword [edi + 6]
call dword [sym.imp.WSOCK32.DLL_connect]
add esp, 0x10
test eax, eax
jne 0x201c2e
jmp 0x201c05
mov eax, dword [edi + 0x34]
cmp dword [ebp - 0x68], 0xffffffff
je 0x201bd5
mov eax, dword [ebp - 0x68]
push 0
push 0
push eax
push word [edi + 0x30]
push 2
mov eax, esp
push 0x10
push eax
push dword [edi + 6]
call dword [sym.imp.WSOCK32.DLL_bind]
add esp, 0x10
test eax, eax
jne 0x201c2e
push 5
push dword [edi + 6]
call dword [sym.imp.WSOCK32.DLL_listen]
test eax, eax
jne 0x201c2e
mov ebx, edi
mov ecx, dword [esp]
call fcn.0020299c
jb 0x201c54
mov dword [ebx + 0x10], edx
cld
lea esi, [esp + 4]
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add esp, 0x448
pop edi
pop esi
ret
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
cmp eax, 0x2734
jne 0x201c3f
mov al, 0x46
mov dx, 0x39b0
mov al, 0x39
push eax
call fcn.00201ec9
pop eax
mov dx, 0x37b0
mov al, 0x37
mov dx, 0x34b0
mov al, 0x34
mov dx, 0x44b0
mov al, 0x44
mov edx, dword [ebp - 0x64]
test edx, edx
je 0x201c69
push eax
mov esi, edx
call fcn.00202b37
call fcn.002029d0
pop eax
add esp, 0x448
pop edi
pop esi
jmp fcn.00201670