Function at 0x18000e670
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rdi
push r12
push r13
push r15
sub rsp, 0xa8
mov rax, qword [0x180077010]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rax, qword [rcx + 0xc0]
mov rbx, rcx
mov rcx, qword [rcx + 0xc8]
xor ebp, ebp
mov qword [rsp + 0x78], r8
mov qword [rsp + 0x48], rdx
cmp rax, rcx
jb 0x18000e721
cmp dword [rbx + 0x30], ebp
je 0x18000e743
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000e70a
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], bpl
mov rcx, qword [rbx + 0xc8]
jmp 0x18000e71a
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
movzx r8d, dl
mov dword [rsp + 0x68], r8d
mov dword [rsp + 0x3c], r8d
mov qword [rbx + 0xc0], rax
cmp rax, rcx
jae 0x18000e74b
jmp 0x18000e7b8
mov dword [rsp + 0x68], ebp
mov dword [rsp + 0x3c], ebp
cmp dword [rbx + 0x30], 0
je 0x18000e7e2
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000e7a1
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
mov rcx, qword [rbx + 0xc8]
jmp 0x18000e7b1
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx r12d, byte [rax]
inc rax
movzx edx, r12b
mov dword [rsp + 0x5c], edx
mov qword [rbx + 0xc0], rax
cmp rax, rcx
jae 0x18000e7e9
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000e85c
xor r12b, r12b
mov dword [rsp + 0x5c], ebp
cmp dword [rbx + 0x30], 0
je 0x18000e85a
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000e834
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000e844
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000e85c
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x40], eax
call fcn.180002110
mov rcx, rbx
movsxd r13, eax
call fcn.180002110
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x50], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x18000e899
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x18000e90c
cmp dword [rbx + 0x30], 0
je 0x18000e90a
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000e8e4
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000e8f4
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000e90c
xor dl, dl
movzx edx, dl
mov rcx, rbx
mov qword [rsp + 0xf8], rsi
mov dword [rsp + 0x34], edx
mov qword [rsp + 0xa0], r14
call fcn.180002110
mov rcx, rbx
call fcn.180002110
mov rcx, rbx
call fcn.180002110
mov rcx, rbx
mov dword [rsp + 0x44], eax
call fcn.180002110
mov rcx, qword [rbx + 0xc8]
mov dword [rsp + 0x58], eax
mov rax, qword [rbx + 0xc0]
cmp rax, rcx
jb 0x18000e9cb
cmp dword [rbx + 0x30], 0
je 0x18000e9f3
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000e9b4
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
mov rcx, qword [rbx + 0xc8]
jmp 0x18000e9c4
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
movzx r14d, dl
mov qword [rbx + 0xc0], rax
mov esi, r14d
cmp rax, rcx
jae 0x18000e9f8
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000ea6b
mov r14d, ebp
mov esi, ebp
cmp dword [rbx + 0x30], 0
je 0x18000ea69
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000ea43
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000ea53
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000ea6b
xor cl, cl
mov r8d, dword [rsp + 0x58]
mov r15d, 1
movzx eax, cl
mov qword [rsp + 0x80], rbp
mov dword [rsp + 0x88], ebp
mov dword [rsp + 0x54], ebp
cmp r8d, 0x1000000
jg 0x18000f362
mov r9d, dword [rsp + 0x44]
cmp r9d, 0x1000000
jg 0x18000f362
mov edx, dword [rsp + 0x40]
cmp edx, 8
mov dword [rsp + 0x38], ebp
lea ecx, [rdx - 8]
cmovb ecx, edx
shr eax, 5
and eax, r15d
mov edx, r15d
sub edx, eax
cmp dword [rsp + 0x5c], 0
mov dword [rsp + 0x70], edx
je 0x18000eaf7
mov esi, dword [rsp + 0x34]
mov ecx, esi
sub ecx, 8
je 0x18000eb61
sub ecx, 7
je 0x18000eb51
sub ecx, r15d
je 0x18000eb51
sub ecx, 8
je 0x18000eb13
cmp ecx, 8
jne 0x18000eb22
jmp 0x18000eb13
sub esi, 8
je 0x18000eb61
sub esi, 7
je 0x18000eb51
sub esi, r15d
je 0x18000eb41
sub esi, 8
je 0x18000eb10
cmp esi, 8
jne 0x18000eb22
mov esi, r14d
shr esi, 3
mov dword [rsp + 0x34], esi
mov dword [rsp + 0x38], ebp
test esi, esi
jne 0x18000eb69
mov edx, dword [0x180077fa8]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_format
jmp 0x18000f37c
cmp ecx, 3
jne 0x18000eb51
mov esi, 2
mov dword [rsp + 0x34], esi
jmp 0x18000eb69
mov esi, 3
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x34], esi
jmp 0x18000eb69
mov dword [rsp + 0x34], r15d
mov esi, r15d
mov rax, qword [rsp + 0x48]
mov dword [rax], r9d
mov rax, qword [rsp + 0x78]
mov dword [rax], r8d
test r9d, r9d
js 0x18000f362
test r8d, r8d
js 0x18000f362
je 0x18000eba6
mov eax, 0x7fffffff
mov ecx, ebp
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x18000f362
mov ecx, r8d
imul ecx, r9d
mov dword [rsp + 0x78], ecx
test ecx, ecx
js 0x18000f362
xor edx, edx
mov eax, 0x7fffffff
div esi
mov edi, eax
cmp ecx, eax
jg 0x18000f362
test r8d, r8d
je 0x18000ebe3
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x18000f346
mov eax, esi
imul eax, r8d
imul eax, r9d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
mov rdx, rax
test rax, rax
je 0x18000f346
cmp dword [rsp + 0x68], 0
je 0x18000ec51
cmp qword [rbx + 0x10], 0
mov edx, dword [rsp + 0x3c]
je 0x18000ec42
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x18000ec42
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x18000ec4c
movsxd rax, edx
add qword [rbx + 0xc0], rax
mov rdx, qword [rsp + 0x48]
cmp dword [rsp + 0x5c], 0
jne 0x18000ed0e
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x3c], r14d
mov byte [rsp + 0x30], r12b
cmp ecx, 8
jae 0x18000ee86
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x3c], r14d
mov byte [rsp + 0x30], r12b
test eax, eax
jne 0x18000ee86
mov r15d, dword [rsp + 0x58]
mov r12d, dword [rsp + 0x44]
test r15d, r15d
jle 0x18000f2d2
mov ebp, r12d
mov edi, r15d
imul ebp, esi
cmp dword [rsp + 0x70], eax
je 0x18000ecec
mov eax, ebp
neg eax
movsxd r14, eax
lea eax, [r15 - 1]
imul eax, esi
imul eax, r12d
movsxd rsi, eax
add rsi, rdx
nop dword [rax]
nop word [rax + rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.180001ef0
add rsi, r14
sub rdi, 1
jne 0x18000ecd0
jmp 0x18000f2ce
movsxd r14, ebp
mov rsi, rdx
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.180001ef0
add rsi, r14
sub rdi, 1
jne 0x18000ecf2
jmp 0x18000f2ce
cmp dword [rsp + 0x50], 0
jne 0x18000ed3d
mov rcx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [0x180077fa8]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_palette
jmp 0x18000f37c
test r13d, r13d
je 0x18000ed90
jns 0x18000ed54
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x18000ed90
cmp qword [rbx + 0x10], 0
je 0x18000ed89
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r13d
jge 0x18000ed89
mov rax, qword [rbx + 0xc8]
sub r13d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r13d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x18000ed90
add qword [rbx + 0xc0], r13
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x18000f33b
cmp ecx, edi
mov eax, ebp
setle al
test eax, eax
je 0x18000f33b
mov edi, esi
imul edi, ecx
movsxd rcx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x80], rax
mov r13, rax
test rax, rax
je 0x18000f33b
cmp dword [rsp + 0x38], 0
mov dword [rsp + 0x3c], r14d
mov byte [rsp + 0x30], r12b
je 0x18000eeea
mov rdi, rax
mov eax, dword [rsp + 0x50]
test eax, eax
jle 0x18000ee82
mov r13d, esi
mov esi, eax
mov dword [rsp + 0x3c], r14d
mov byte [rsp + 0x30], r12b
mov rcx, rbx
call fcn.180002110
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rdi], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rdi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rdi + 2], dl
add rdi, r13
sub rsi, r15
jne 0x18000ee00
mov esi, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x40]
mov eax, dword [rsp + 0x78]
mov r14d, esi
test eax, eax
jle 0x18000f239
mov r12, qword [rsp + 0x48]
lea rdx, [rsp + 0x88]
sub r12, rdx
mov r10d, esi
mov r9d, eax
mov qword [rsp + 0x68], rax
mov r8d, ebp
mov r13d, ebp
cmp ecx, 8
jb 0x18000efaa
test r8d, r8d
jne 0x18000ef9c
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18000ef0f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000ef82
mov r8d, edi
mov rdx, r13
mov rcx, rbx
call fcn.180001ef0
test eax, eax
jne 0x18000ee82
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
jmp 0x18000ed18
cmp dword [rbx + 0x30], 0
je 0x18000ef80
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000ef5a
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000ef6a
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000ef82
xor cl, cl
movzx eax, cl
mov r8d, eax
and r8d, 0x7f
inc r8d
shr eax, 7
mov r13d, eax
mov dword [rsp + 0x54], r8d
jmp 0x18000efaa
test r13d, r13d
je 0x18000efaa
test r15d, r15d
je 0x18000f1f9
cmp byte [rsp + 0x30], 0
je 0x18000f09b
cmp dword [rsp + 0x3c], 8
jne 0x18000f060
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18000efe5
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x18000f068
cmp dword [rbx + 0x30], 0
je 0x18000f059
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000f030
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000f040
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x18000f068
xor cl, cl
movzx eax, cl
jmp 0x18000f068
mov rcx, rbx
call fcn.180002110
cmp eax, dword [rsp + 0x50]
cmovge eax, ebp
test r14, r14
je 0x18000f1e9
imul eax, esi
lea rcx, [rsp + 0x88]
mov r8, r14
movsxd rdx, eax
add rdx, qword [rsp + 0x80]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18000f1e9
cmp dword [rsp + 0x38], 0
je 0x18000f12e
mov rcx, rbx
call fcn.180002110
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsp + 0x88], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsp + 0x89], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x8a], dl
jmp 0x18000f1e9
mov rsi, rbp
test r14, r14
je 0x18000f1e5
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x18000f15f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000f1d2
cmp dword [rbx + 0x30], 0
je 0x18000f1d0
mov rax, qword [rbx + 0x10]
lea rdi, [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
mov rdx, rdi
mov rcx, qword [rbx + 0x28]
call rax
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add dword [rbx + 0xb8], ecx
mov qword [rbx + 0xc0], rdi
test eax, eax
jne 0x18000f1aa
lea rax, [rbx + 0x39]
mov dword [rbx + 0x30], ebp
mov qword [rbx + 0xc8], rax
mov byte [rdi], 0
jmp 0x18000f1ba
cdqe
lea rcx, [rbx + 0x38]
add rcx, rax
mov qword [rbx + 0xc8], rcx
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x18000f1d2
xor cl, cl
mov byte [rsp + rsi + 0x88], cl
inc rsi
cmp rsi, r14
jl 0x18000f140
mov esi, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x54]
mov r15d, ebp
mov r9, qword [rsp + 0x68]
mov r10d, esi
mov rdx, rbp
test r14, r14
je 0x18000f21b
lea rcx, [rsp + 0x88]
add rcx, rdx
inc rdx
movzx eax, byte [rcx]
mov byte [r12 + rcx], al
cmp rdx, r14
jl 0x18000f201
mov ecx, dword [rsp + 0x40]
dec r8d
add r12, r10
mov dword [rsp + 0x54], r8d
sub r9, 1
mov qword [rsp + 0x68], r9
jne 0x18000eeb6
cmp dword [rsp + 0x70], 0
mov r15d, dword [rsp + 0x58]
mov r12d, dword [rsp + 0x44]
je 0x18000f2b8
test r15d, r15d
jle 0x18000f2b8
mov rdi, qword [rsp + 0x48]
lea r10d, [r15 - 1]
imul r10d, esi
mov r11d, esi
imul r11d, r12d
mov ebx, ebp
imul r10d, r12d
nop dword [rax]
mov r8d, r11d
test r11d, r11d
jle 0x18000f2aa
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + rdi]
nop word [rax + rax]
movzx eax, byte [r9 + rdx]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [r9 + rdx], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x18000f290
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, r15d
jl 0x18000f270
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x18000f2ce
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [rsp + 0x38]
mov edx, dword [rsp + 0x34]
cmp edx, 3
jb 0x18000f319
test eax, eax
mov rax, qword [rsp + 0x48]
jne 0x18000f31e
mov ecx, dword [rsp + 0x78]
mov r8, rax
test ecx, ecx
jle 0x18000f31e
mov r10d, ecx
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, rdx
sub r10, 1
jne 0x18000f300
mov rax, qword [rsp + 0x48]
cmp edx, 4
je 0x18000f387
mov r9d, r12d
mov dword [rsp + 0x20], r15d
mov r8d, 4
mov rcx, rax
call fcn.180002260
jmp 0x18000f387
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [0x180077fa8]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x18000f37c
mov edx, dword [0x180077fa8]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov ecx, 0x28
mov qword [rcx + rax], rdx
xor eax, eax
mov r14, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1800605d0
add rsp, 0xa8
pop r15
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret