Function at 0x140004510
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x140085018]
xor rax, rsp
mov qword [rsp + 0x40], rax
movsxd rax, dword [0x140088080]
movzx r9d, cl
cmp eax, 5
ja case.default.0x140004553
lea rsi, [0x140000000]
mov eax, dword [rsi + rax*4 + 0x48ac]
add rax, rsi
jmp rax
cmp r9b, 2
jne case.default.0x140004553
mov dword [0x140088080], 1
jmp case.default.0x140004553
mov byte [0x140088031], r9b
mov dword [0x140088080], 2
jmp case.default.0x140004553
mov ecx, 0x10
mov byte [0x140088088], r9b
call fcn.1400281e0
mov qword [0x140088038], rax
mov rcx, rax
test rax, rax
je case.default.0x140004553
movzx eax, byte [0x140088031]
mov byte [rcx], al
movzx eax, byte [0x140088088]
mov byte [rcx + 1], al
mov ecx, eax
call fcn.1400281e0
mov rcx, rax
mov byte [0x140088033], 0
mov rax, qword [0x140088038]
mov qword [rax + 8], rcx
movzx eax, byte [0x140088088]
neg al
sbb ecx, ecx
add ecx, 4
mov dword [0x140088080], ecx
jmp case.default.0x140004553
movzx r8d, byte [0x140088033]
mov rdx, qword [0x140088038]
mov rax, qword [rdx + 8]
mov byte [r8 + rax], r9b
inc r8b
mov byte [0x140088033], r8b
cmp r8b, byte [rdx + 1]
jb case.default.0x140004553
mov dword [0x140088080], 4
jmp case.default.0x140004553
movzx eax, byte [0x140088088]
xor edi, edi
mov r10, qword [0x140088038]
movzx ecx, al
xor cl, byte [0x140088031]
mov edx, eax
mov byte [0x140088032], cl
test al, al
je 0x140004672
mov r8, qword [r10 + 8]
mov eax, edi
nop word [rax + rax]
xor cl, byte [r8 + rax]
inc rax
cmp rax, rdx
jl 0x140004660
mov byte [0x140088032], cl
cmp cl, r9b
je 0x1400046fc
movzx eax, byte [r10]
lea r9, [rsp + 0x30]
mov rcx, qword [0x140088078]
lea rdx, [rsp + 0x34]
mov byte [rsp + 0x37], al
mov r8d, 7
xor al, 0x1d
mov word [rsp + 0x34], 0xff02
mov byte [rsp + 0x39], al
mov byte [rsp + 0x36], 2
mov byte [rsp + 0x3a], 3
mov byte [rsp + 0x38], 0xe0
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [0x140088038]
mov rcx, qword [rbx + 8]
call fcn.1400281b0
mov rcx, rbx
mov qword [rbx + 8], rdi
call fcn.1400281b0
xor eax, eax
mov qword [0x140088038], rdi
mov dword [0x140088080], edi
mov byte [0x140088033], dil
jmp 0x14000488c
mov dword [0x140088080], 5
jmp case.default.0x140004553
xor edi, edi
cmp r9b, 3
je 0x14000479b
mov rax, qword [0x140088038]
lea r9, [rsp + 0x30]
lea r8d, [rdi + 7]
mov word [rsp + 0x34], 0xff02
lea rdx, [rsp + 0x34]
mov byte [rsp + 0x36], 2
mov byte [rsp + 0x3a], 3
movzx ecx, byte [rax]
mov byte [rsp + 0x37], cl
xor cl, 0x1e
mov byte [rsp + 0x39], cl
mov rcx, qword [0x140088078]
mov byte [rsp + 0x38], 0xe3
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rbx, qword [0x140088038]
mov rcx, qword [rbx + 8]
call fcn.1400281b0
mov rcx, rbx
mov qword [rbx + 8], rdi
call fcn.1400281b0
mov qword [0x140088038], rdi
mov dword [0x140088080], edi
mov byte [0x140088033], dil
jmp case.default.0x140004553
mov r9d, dword [0x140088084]
mov eax, r9d
mov r8d, dword [0x140088034]
sub eax, r8d
inc eax
cmp eax, 7
jl 0x14000483c
mov eax, 0x92492493
mov ecx, r8d
imul r8d
add edx, r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 7
sub ecx, eax
movsxd rax, ecx
mov rbx, qword [rsi + rax*8 + 0x88040]
test rbx, rbx
je 0x140004832
mov rcx, qword [rbx + 8]
call fcn.1400281b0
mov rcx, rbx
mov qword [rbx + 8], rdi
call fcn.1400281b0
mov r8d, dword [0x140088034]
mov eax, 0x92492493
mov r9d, dword [0x140088084]
mov ecx, r8d
imul r8d
add edx, r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 7
sub ecx, eax
movsxd rax, ecx
mov qword [rsi + rax*8 + 0x88040], rdi
inc r8d
mov dword [0x140088034], r8d
mov eax, 0x92492493
mov dword [0x140088080], edi
imul r9d
mov byte [0x140088033], dil
add edx, r9d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul ecx, edx, 7
mov edx, r9d
inc r9d
mov dword [0x140088084], r9d
sub edx, ecx
mov rcx, qword [0x140088038]
movsxd r8, edx
mov qword [rsi + r8*8 + 0x88040], rcx
call fcn.140004350
mov eax, 1
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000a530
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret