Function at 0x6c53d0
Capabilities:
Connect socket
Get hostname
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x224
mov al, byte [0x6b27a4]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x68], al
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x69]
mov ebp, 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x240]
test eax, eax
jne 0x6c5411
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x224
ret
mov byte [eax], 0
call fcn.006c7e90
cmp eax, 1
jne 0x6c5420
xor ebp, ebp
mov ebx, dword [esp + 0x23c]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0xcc]
rep stosd dword es:[edi], eax
lea edi, [ebx + 2]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xcc]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x6b0288
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll__stricmp]
lea ecx, [esp + 0xd0]
push ecx
call esi
add esp, 8
test eax, eax
jne 0x6c54a0
cmp ebp, 1
jne 0x6c54a0
mov edx, dword [esp + 0x240]
mov eax, dword [esp + 0x238]
push edx
push eax
call fcn.006cbd20
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x224
ret
lea ecx, [esp + 0xcc]
push 0x6b0288
push ecx
call esi
add esp, 8
test eax, eax
jne 0x6c5506
test ebp, ebp
jne 0x6c5506
mov edi, 2
push 0x64
cmp word [ebx + 0x74], di
jne 0x6c54d6
lea edx, [esp + 0x6c]
push edx
call fcn.006c8730
add esp, 8
jmp 0x6c5533
lea eax, [esp + 0x6c]
push eax
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
jne 0x6c5533
mov ecx, dword [0x6b118c]
mov edx, dword [0x6b1190]
mov ax, word [0x6b1194]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
mov word [esp + 0x70], ax
jmp 0x6c5533
lea edi, [esp + 0xcc]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x68]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 2
call fcn.006c84e0
xor ecx, ecx
mov cx, word [ebx + 0x74]
dec ecx
cmp ecx, 7
ja case.0x6c5544.3
jmp dword [ecx*4 + 0x6c5ba4]
mov ecx, dword [esp + 0x240]
mov edx, dword [esp + 0x238]
push ecx
push ebx
push edx
call fcn.006c5ca0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x224
ret
and eax, 1
cmp al, 1
jne 0x6c5586
mov dword [esp + 0x10], 1
jmp 0x6c55b4
and eax, edi
cmp al, 2
je 0x6c55b0
pop edi
pop esi
pop ebp
mov eax, 0x4c
pop ebx
add esp, 0x224
ret
mov ecx, eax
and ecx, 1
cmp cl, 1
jne 0x6c55aa
mov dword [esp + 0x10], 1
jmp 0x6c55b4
and eax, edi
cmp al, 2
jne 0x6c5586
mov dword [esp + 0x10], edi
lea edx, [esp + 0x68]
push edx
call fcn.006c8540
add esp, 4
test eax, eax
jne 0x6c55d0
test byte [esp + 0x10], 2
je 0x6c55d0
mov dword [esp + 0x10], edi
push ebx
call fcn.006c4570
add esp, 4
cmp eax, 0xffffffff
jne 0x6c5619
cmp dword [esp + 0x10], edi
jne 0x6c55ee
push 0x3e8
push edi
push 6
jmp 0x6c55f2
push 0x11
push edi
push edi
call fcn.006c42e0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x6c560f
pop edi
pop esi
pop ebp
mov eax, 0x3f
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.006c4590
add esp, 8
mov eax, dword [esp + 0x10]
push 0
cmp eax, edi
jne 0x6c5634
lea eax, [esp + 0x30]
lea ecx, [esp + 0x6c]
push eax
push ecx
call fcn.006c8670
jmp 0x6c5643
lea edx, [esp + 0x30]
lea eax, [esp + 0x6c]
push edx
push eax
call fcn.006c82a0
add esp, 0xc
test eax, eax
je 0x6c565a
pop edi
pop esi
pop ebp
mov eax, 0x3d
pop ebx
add esp, 0x224
ret
mov eax, dword [0x6b1278]
test eax, eax
je 0x6c567b
call fcn.006c5bd0
push eax
call fcn.006c1a20
add esp, 4
mov dword [0x6b1278], 0
call sub.MSVCRT.dll__getpid
mov dword [0x6b2e4c], eax
call fcn.006c5bd0
cmp dword [eax], 0
je 0x6c56f1
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x6c56f1
call esi
cmp eax, 0x80000000
jb 0x6c56ad
call esi
cmp al, 4
jb 0x6c56f1
cmp dword [esp + 0x10], edi
jne 0x6c56f1
push ebx
call fcn.006c4570
add esp, 4
push eax
call sub.WSOCK32.dll_closesocket
push 0x3e8
push edi
push 6
call fcn.006c42e0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x6c56e7
pop edi
pop esi
pop ebp
mov eax, 0x3f
pop ebx
add esp, 0x224
ret
push eax
push ebx
call fcn.006c4590
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
call fcn.006c5bd0
mov edx, dword [eax]
push edx
call fcn.006c5be0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x6c5802
push 0x58
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x6c5731
pop edi
pop esi
pop ebp
mov eax, 0x40
pop ebx
add esp, 0x224
ret
cmp dword [esp + 0x10], edi
jne 0x6c577f
lea esi, [ebp + 8]
xor eax, eax
mov ecx, esi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov word [esi], 6
call fcn.006c45e0
push eax
call fcn.006c4410
lea edx, [esp + 0x30]
push esi
push edx
mov word [esi + 0xc], ax
call fcn.006c85e0
add esp, 0xc
test eax, eax
jne 0x6c57c8
pop edi
pop esi
pop ebp
mov eax, 0x3d
pop ebx
add esp, 0x224
ret
lea eax, [ebp + 8]
xor ecx, ecx
mov edx, eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov word [eax], di
call fcn.006c45e0
push eax
call fcn.006c4410
mov word [ebp + 0xa], ax
lea eax, [esp + 0x30]
push eax
call fcn.006c4290
add esp, 8
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x6c57c8
pop edi
pop esi
pop ebp
mov eax, 0x3d
pop ebx
add esp, 0x224
ret
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp], 1
call fcn.006c5bd0
push eax
call fcn.006c1a30
add esp, 8
mov esi, dword [esp + 0x238]
mov dword [0x6b2e40], 0x6e
mov ecx, dword [ebp]
mov edi, esi
and ecx, 0x1fff
xor eax, eax
mov dword [0x6b2e44], ecx
or ecx, 0xffffffff
mov dword [0x6b2e48], 0
repne scasb al, byte es:[edi]
not ecx
mov edx, ecx
mov edi, 0x6b2e50
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x68
mov edi, 0x6b2c98
rep stosd dword es:[edi], eax
lea eax, [esp + 0x4c]
push eax
call fcn.006c53b0
mov ecx, 0x68
xor eax, eax
mov edi, 0x6b2fe8
mov dword [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x6b2e40]
mov dword [esp + 0x18], 1
push ecx
call fcn.006c4440
mov edx, dword [0x6b2e44]
mov dword [0x6b2fe8], eax
push edx
call fcn.006c4440
mov dword [0x6b2fec], eax
mov eax, dword [0x6b2e48]
push eax
call fcn.006c4440
mov ecx, dword [0x6b2e4c]
mov dword [0x6b2ff0], eax
push ecx
call fcn.006c4440
mov dword [0x6b2ff4], eax
mov edi, 0x6b2e50
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x4c]
mov edx, ecx
mov esi, edi
mov edi, 0x6b2ff8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x18], 3
jge 0x6c5b5a
mov eax, dword [esp + 0x10]
mov esi, 2
cmp eax, esi
jne 0x6c594e
lea ecx, [ebp + 8]
push 0x10
push ecx
push ebx
call fcn.006c4570
add esp, 4
push eax
call sub.WSOCK32.dll_connect
mov eax, dword [esp + 0x14]
test eax, eax
je 0x6c5985
push 0
push 0x1a0
push 0x6b2fe8
push ebx
call fcn.006c4570
add esp, 4
push eax
call sub.WSOCK32.dll_send
cmp eax, 0x1a0
jne 0x6c5b25
jmp 0x6c5985
mov eax, dword [esp + 0x14]
test eax, eax
je 0x6c5985
lea edx, [ebp + 8]
push 0x10
push edx
push 0
push 0x1a0
push 0x6b2fe8
push ebx
call fcn.006c4570
add esp, 4
push eax
call fcn.006c4390
add esp, 0x18
cmp eax, 0x1a0
jne 0x6c5b2a
xor edi, edi
push ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x134], edi
call fcn.006c4570
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x28], edi
mov dword [esp + ecx*4 + 0x134], eax
mov ecx, dword [esp + 0x130]
mov eax, dword [edx]
inc ecx
mov dword [esp + 0x130], ecx
lea ecx, [esp + 0x24]
push ecx
push edi
lea edx, [esp + 0x138]
push edi
push edx
push ebx
mov dword [esp + 0x38], eax
call fcn.006c4570
add esp, 4
inc eax
push eax
call fcn.006c4310
add esp, 0x14
cmp eax, 0xffffffff
je 0x6c5b4a
cmp eax, edi
je 0x6c5b08
mov ecx, 0x68
xor eax, eax
mov edi, 0x6b2fe8
mov dword [esp + 0x20], 0x10
rep stosd dword es:[edi], eax
cmp dword [esp + 0x10], esi
jne 0x6c5a3d
push 0
push 0x1a0
push 0x6b2fe8
push ebx
call fcn.006c4570
add esp, 4
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0x1a0
jne 0x6c5b3a
jmp 0x6c5a6e
lea eax, [esp + 0x20]
lea ecx, [esp + 0x58]
push eax
push ecx
push 0
push 0x1a0
push 0x6b2fe8
push ebx
call fcn.006c4570
add esp, 4
push eax
call fcn.006c43d0
add esp, 0x18
cmp eax, 0xffffffff
je 0x6c5b3a
mov edx, dword [0x6b2fe8]
push edx
call fcn.006c4440
mov dword [0x6b2c98], eax
mov eax, dword [0x6b2fec]
push eax
call fcn.006c4440
mov ecx, dword [0x6b2ff0]
mov dword [0x6b2c9c], eax
push ecx
call fcn.006c4440
mov edx, dword [0x6b2ff4]
mov dword [0x6b2ca0], eax
push edx
call fcn.006c4440
mov dword [0x6b2ca4], eax
mov edi, 0x6b2ff8
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x6b2ca8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
cmp eax, 1
rep movsb byte es:[edi], byte [esi]
jne 0x6c5af4
mov eax, dword [ebp + 0xc]
lea edx, [ebp + 0xc]
lea ecx, [esp + 0x5c]
cmp eax, dword [ecx]
jne 0x6c58f1
mov ecx, dword [0x6b2c9c]
mov eax, dword [0x6b2e44]
cmp ecx, eax
je 0x6c5b6a
jmp 0x6c58f1
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], ecx
add eax, 4
jmp 0x6c58ed
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
pop ebp
mov eax, 0x3e
pop ebx
add esp, 0x224
ret
pop edi
pop esi
pop ebp
mov eax, 0x6c
pop ebx
add esp, 0x224
ret
pop edi
pop esi
pop ebp
mov eax, 0x6d
pop ebx
add esp, 0x224
ret
pop edi
pop esi
pop ebp
mov eax, 0x3c
pop ebx
add esp, 0x224
ret
mov ecx, dword [ebp]
mov edi, 0x6b2ca8
inc ecx
xor eax, eax
mov dword [ebp], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x240]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x224
ret