Function at 0x801e80
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Download and write a file
Get socket status
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration
Terminate thread
Write file on windows

Disassembly:
mov eax, 0x22b0
call fcn.00807bc0
mov eax, dword [0x81c0d0]
xor eax, esp
mov dword [esp + 0x22ac], eax
cmp dword [esp + 0x22c4], 1
mov eax, dword [esp + 0x22b8]
mov ecx, dword [esp + 0x22bc]
push ebp
mov ebp, dword [esp + 0x22b8]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x22c4]
push esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov dword [eax], 0xffffffff
jne 0x801ed8
mov dword [ecx], 0
push 0x81624c
call fcn.00801c20
push eax
push ebp
call fcn.008065e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x801f0c
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x22ac]
xor ecx, esp
call fcn.0080700b
add esp, 0x22b0
ret
push ebx
push edi
push 0x816274
add esi, 7
call fcn.00801c20
push eax
lea ebx, [esi + 7]
push ebx
call fcn.008065e0
add esp, 0xc
test eax, eax
je 0x801f4c
mov edi, eax
sub edi, esi
push edi
lea ecx, [esp + 0x258]
push esi
push ecx
call fcn.00807a90
add esp, 0xc
mov byte [esp + edi + 0x254], 0
jmp 0x801f61
lea edx, [esp + 0x254]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x801f57
push 0x816284
call fcn.00801c20
push eax
lea edx, [esp + 0x25c]
push edx
call fcn.008065e0
add esp, 0xc
test eax, eax
je 0x801f91
mov byte [eax], 0
inc eax
push eax
call fcn.00807a80
add esp, 4
mov edi, eax
jmp 0x801f96
mov edi, 0x50
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x802391
lea eax, [esp + 0x28]
push eax
push 0
lea ecx, [esp + 0x25c]
push ecx
push 0x8012d0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x801ff8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x8023c2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [esp + 0x244], eax
mov dword [esp + 0x248], eax
mov dword [esp + 0x24c], eax
mov dword [esp + 0x250], eax
lea eax, [esp + 0x254]
mov edx, 2
push eax
mov word [esp + 0x248], dx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x802043
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push edi
mov dword [esp + 0x24c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x246], ax
lea eax, [esp + 0x24]
push eax
push 0x8004667e
mov esi, 1
push ebx
mov dword [esp + 0x30], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea ecx, [esp + 0x248]
push ecx
push ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x48], esi
call dword [sym.imp.WS2_32.dll_connect]
mov edx, dword [esp + 0x22d8]
lea eax, [esp + 0x2c]
push eax
mov ecx, 0x41
lea esi, [esp + 0x40]
lea edi, [esp + 0x144]
push 0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x148]
push ecx
push 0
push 1
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], edx
call dword [sym.imp.WS2_32.dll_select]
lea edx, [esp + 0x140]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x80238a
lea eax, [esp + 0x254]
push eax
push ebp
push 0x816298
call fcn.00801c20
add esp, 4
push eax
lea ecx, [esp + 0x12c8]
push ecx
call fcn.008079ed
lea eax, [esp + 0x12cc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x802111
sub eax, edx
push 0
mov esi, eax
push esi
lea edx, [esp + 0x12c4]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x80238a
cmp dword [esp + 0x22d4], 0
mov dword [esp + 0x14], 0
mov byte [esp + 0x13], 0
jne 0x802171
push 0x816318
call fcn.00801c20
push eax
mov eax, dword [esp + 0x20]
push eax
call fcn.008079d6
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x80238a
mov ebp, dword [esp + 0x28]
jmp 0x802180
mov ecx, dword [esp + 0x22dc]
lea edx, [esp + 0x34]
push edx
push 0
push 0
lea eax, [esp + 0x48]
push eax
push 1
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [esp + 0x3c]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x80236e
push 0
push 0x1000
lea edx, [esp + 0x2c0]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
mov byte [esp + edi + 0x2b8], 0
test edi, edi
jle 0x80237c
cmp byte [esp + 0x13], 0
je 0x80224d
mov esi, dword [esp + 0x22d4]
test esi, esi
jne 0x802223
mov eax, dword [esp + 0x18]
push eax
push 1
lea ecx, [esp + 0x2c0]
push edi
push ecx
call fcn.00807890
add esp, 0x10
add dword [esp + 0x14], edi
jmp 0x80234a
cmp esi, 1
jne 0x802244
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
add ecx, dword [esp + 0x14]
push edi
lea edx, [esp + 0x2bc]
push edx
push ecx
call fcn.008068c0
add esp, 0xc
add dword [esp + 0x14], edi
jmp 0x80234a
push str.nb662MSLSBVRV
call fcn.00801c20
push eax
lea edx, [esp + 0x2c0]
push edx
call fcn.008065e0
add esp, 0xc
test eax, eax
jne 0x80238a
push str.nb662MSLSBPRR
call fcn.00801c20
push eax
lea eax, [esp + 0x2c0]
push eax
call fcn.008065e0
add esp, 0xc
test eax, eax
je 0x80238a
push str.mb__r_f
call fcn.00801c20
push eax
lea ecx, [esp + 0x2c0]
push ecx
call fcn.008065e0
add esp, 0xc
test eax, eax
je 0x80238a
add eax, 0x10
push eax
call fcn.00807a80
push str.fbohoh
mov ebp, eax
call fcn.00801c20
push eax
lea edx, [esp + 0x2c4]
push edx
call fcn.008065e0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x80238a
add esi, 4
lea eax, [esp + 0x2b8]
sub eax, esi
add edi, eax
mov eax, dword [esp + 0x22d4]
mov byte [esp + 0x13], 1
test eax, eax
jne 0x80231a
mov ecx, dword [esp + 0x18]
push ecx
push 1
push edi
push esi
call fcn.00807890
mov edx, dword [esp + 0x30]
mov dword [edx], ebp
jmp 0x80233c
cmp eax, 1
jne 0x80233f
mov eax, dword [esp + 0x20]
lea ecx, [ebp + 1]
push ecx
mov dword [eax], ebp
call fcn.008064df
mov edx, dword [esp + 0x20]
push edi
push esi
push eax
mov dword [edx], eax
call fcn.008068c0
add esp, 0x10
mov esi, dword [esp + 0x22d4]
mov dword [esp + 0x14], edi
cmp ebp, dword [esp + 0x14]
jg 0x802180
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
jne 0x802396
mov eax, dword [esp + 0x18]
push eax
call fcn.008076b2
add esp, 4
jmp 0x8023bd
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffd
jmp 0x8023c2
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffc
jmp 0x8023c2
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x8023c2
cmp esi, 1
jne 0x8023bd
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [esp + 0x20]
mov byte [ecx + ebp], 0
cmp dword [edx], 0
jge 0x8023b3
lea eax, [esi - 6]
jmp 0x8023c2
cmp dword [eax], 0
mov eax, 0xfffffffb
je 0x8023c2
mov eax, 1
mov ecx, dword [esp + 0x22bc]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.0080700b
add esp, 0x22b0
ret