Function at 0x140028980
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.140070d88
mov rcx, rax
call fcn.14007b484
mov ecx, eax
call fcn.14007c8e4
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.140070d88
lea rdx, [0x1400aff82]
mov rcx, rax
call fcn.14006c4a4
test eax, eax
jle 0x140028ac6
test ebx, ebx
je 0x140028b78
xorps xmm6, xmm6
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x1400295d0]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x1400294e0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x140028c1c
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.1400811fc
test rax, rax
je 0x140028c12
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 0x140028c0d
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x1400295d0]
mov qword [rsp + 0x58], rax
mov rsi, qword [rdi]
lea r8, [0x1400294e0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x140028c1c
mov rax, qword [rsi]
mov rdi, qword [rax + 0x20]
test rdi, rdi
je 0x140028ba4
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 0x140028ba6
mov ebp, eax
cdqe
lea rcx, [rax*2 + 2]
call fcn.1400811fc
test rax, rax
je 0x140028ba4
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 0x140028ba8
mov qword [rsp + 0x50], 0
lea rax, [0x140029660]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x1400294e0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
jmp 0x140028c1c
xor esi, esi
xor ebx, ebx
lea rcx, str.user32.dll
call sub.KERNEL32.dll_LoadLibraryW
mov rdi, rax
test rax, rax
je 0x140028c02
lea rdx, str.MessageBoxW
mov rcx, rdi
call sub.KERNEL32.dll_GetProcAddress
test rax, rax
je 0x140028c02
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140028c30
mov rdx, qword [rsp + 0x48]
mov word [rcx + rdx*2], 0
mov rdx, qword [rsp + 0x40]
test rsi, rsi
je 0x140028bf5
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.140080484
mov rcx, qword [rsp + 0x40]
call fcn.140080484
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
ret
xor edx, edx
test rsi, rsi
jne 0x140028bef
jmp 0x140028bf5