Function at 0x140028970
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
movaps xmmword [rsp + 0x80], xmm6
mov rdi, rcx
mov ecx, 2
call fcn.140070c58
mov rcx, rax
call fcn.14007b354
mov ecx, eax
call fcn.14007c7b4
mov rsi, rax
xorps xmm6, xmm6
movaps xmmword [rsp + 0x60], xmm6
mov qword [rsp + 0x6e], 0
lea rdx, [rsp + 0x60]
mov rcx, rax
call sub.KERNEL32.dll_GetConsoleScreenBufferInfo
mov ebx, eax
mov ecx, 2
call fcn.140070c58
lea rdx, [0x1400aef82]
mov rcx, rax
call fcn.14006c494
test eax, eax
jle 0x140028ab6
test ebx, ebx
je 0x140028b68
xorps xmm6, xmm6
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x1400295c0]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x1400294d0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x140028c0c
call sub.KERNEL32.dll_GetConsoleOutputCP
mov edi, eax
mov r8, qword [rsp + 0x40]
mov r9d, dword [rsp + 0x48]
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov ecx, eax
xor edx, edx
call sub.KERNEL32.dll_WideCharToMultiByte
mov ebx, eax
movsxd rcx, eax
call fcn.1400810cc
test rax, rax
je 0x140028c02
mov r8, qword [rsp + 0x40]
mov r9d, dword [rsp + 0x48]
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov ecx, edi
xor edx, edx
mov rdi, rax
call sub.KERNEL32.dll_WideCharToMultiByte
mov qword [rsp + 0x20], 0
mov rcx, rsi
mov rdx, rdi
mov r8d, ebx
xor r9d, r9d
call sub.KERNEL32.dll_WriteFile
mov rcx, rdi
jmp 0x140028bfd
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x1400295c0]
mov qword [rsp + 0x58], rax
mov rsi, qword [rdi]
lea r8, [0x1400294d0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x140028c0c
mov rax, qword [rsi]
mov rdi, qword [rax + 0x20]
test rdi, rdi
je 0x140028b94
mov rbx, qword [rax + 0x28]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor esi, esi
mov ecx, 0xfde9
xor edx, edx
mov r8, rbx
mov r9d, edi
call sub.KERNEL32.dll_MultiByteToWideChar
test eax, eax
je 0x140028b96
mov ebp, eax
cdqe
lea rcx, [rax*2 + 2]
call fcn.1400810cc
test rax, rax
je 0x140028b94
mov rsi, rax
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, rbx
mov r9d, edi
call sub.KERNEL32.dll_MultiByteToWideChar
movsxd rbx, eax
jmp 0x140028b98
mov qword [rsp + 0x50], 0
lea rax, [0x140029650]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x1400294d0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
jmp 0x140028c0c
xor esi, esi
xor ebx, ebx
lea rcx, str.user32.dll
call sub.KERNEL32.dll_LoadLibraryW
mov rdi, rax
test rax, rax
je 0x140028bf2
lea rdx, str.MessageBoxW
mov rcx, rdi
call sub.KERNEL32.dll_GetProcAddress
test rax, rax
je 0x140028bf2
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140028c20
mov rdx, qword [rsp + 0x48]
mov word [rcx + rdx*2], 0
mov rdx, qword [rsp + 0x40]
test rsi, rsi
je 0x140028be5
mov word [rsi + rbx*2], 0
xor ecx, ecx
mov r8, rsi
mov r9d, reloc.WS2_32.dll_recv
call rax
mov rcx, rdi
call sub.KERNEL32.dll_FreeLibrary
mov rcx, rsi
call fcn.140080354
mov rcx, qword [rsp + 0x40]
call fcn.140080354
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
ret
xor edx, edx
test rsi, rsi
jne 0x140028bdf
jmp 0x140028be5