Function at 0x1400472e0
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.140087e88
mov rcx, rax
call fcn.140092584
mov ecx, eax
call fcn.1400939e4
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.140087e88
lea rdx, [0x1400d5b72]
mov rcx, rax
call fcn.1400836c8
test eax, eax
jle 0x140047426
test ebx, ebx
je 0x1400474d8
xorps xmm6, xmm6
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x140047f30]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x140047e40]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x14004757c
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.1400982fc
test rax, rax
je 0x140047572
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 0x14004756d
movaps xmmword [rsp + 0x40], xmm6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x50], rax
lea rax, [0x140047f30]
mov qword [rsp + 0x58], rax
mov rsi, qword [rdi]
lea r8, [0x140047e40]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rsi + reloc.WS2_32.dll_getservbyport]
cmp qword [rsp + 0x40], 0
je 0x14004757c
mov rax, qword [rsi]
mov rdi, qword [rax + 0x20]
test rdi, rdi
je 0x140047504
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 0x140047506
mov ebp, eax
cdqe
lea rcx, [rax*2 + 2]
call fcn.1400982fc
test rax, rax
je 0x140047504
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 0x140047508
mov qword [rsp + 0x50], 0
lea rax, [0x140047fc0]
mov qword [rsp + 0x58], rax
mov rax, qword [rdi]
lea r8, [0x140047e40]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_getservbyport]
jmp 0x14004757c
xor esi, esi
xor ebx, ebx
lea rcx, str.user32.dll
call sub.KERNEL32.dll_LoadLibraryW
mov rdi, rax
test rax, rax
je 0x140047562
lea rdx, str.MessageBoxW
mov rcx, rdi
call sub.KERNEL32.dll_GetProcAddress
test rax, rax
je 0x140047562
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140047590
mov rdx, qword [rsp + 0x48]
mov word [rcx + rdx*2], 0
mov rdx, qword [rsp + 0x40]
test rsi, rsi
je 0x140047555
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.140097584
mov rcx, qword [rsp + 0x40]
call fcn.140097584
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
ret
xor edx, edx
test rsi, rsi
jne 0x14004754f
jmp 0x140047555