Function at 0x1800b5e40
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push r13
push r15
sub rsp, 0x4b0
xor r13d, r13d
mov dword [rsp + 0x84], 0xff
lea rdx, [rsp + 0x68]
mov r15d, r13d
mov rbx, rcx
call fcn.1800b6dd0
test rax, rax
je 0x1800b5ebf
mov eax, dword [rbx + 4]
mov r8d, eax
neg r8d
mov dword [rsp + 0x58], eax
cmovs r8d, eax
mov dword [rbx + 4], r8d
cmp r8d, 0x1000000
jbe 0x1800b5ece
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov qword [rcx + rax], rdx
xor eax, eax
add rsp, 0x4b0
pop r15
pop r13
pop rbx
ret
mov r9d, dword [rbx]
cmp r9d, 0x1000000
ja 0x1800b5e9c
mov eax, dword [rsp + 0x74]
mov r10d, dword [rsp + 0x80]
mov qword [rsp + 0x4a8], rsi
mov esi, dword [rsp + 0x6c]
mov dword [rsp + 0x4f0], eax
mov eax, dword [rsp + 0x78]
mov qword [rsp + 0x4a0], rdi
mov edi, dword [rsp + 0x84]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x7c]
mov qword [rsp + 0x498], r12
mov r12d, dword [rsp + 0x68]
mov qword [rsp + 0x490], r14
mov r14d, dword [rsp + 0x70]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x4f8], r10d
mov dword [rsp + 0x4e8], edi
mov dword [rsp + 0x2c], esi
mov dword [rsp + 0x24], r14d
cmp r14d, 0xc
jne 0x1800b5f7b
cmp r12d, 0x18
jge 0x1800b5f93
mov ecx, esi
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov r15d, edx
shr r15d, 0x1f
add r15d, edx
jmp 0x1800b5f8e
cmp r12d, 0x10
jge 0x1800b5f93
mov r15d, esi
sub r15d, eax
sub r15d, r14d
sar r15d, 2
test r15d, r15d
jne 0x1800b5fe2
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xd0]
add ecx, dword [rbx + 0xb8]
lea eax, [rcx - 1]
cmp eax, 0x3ff
ja 0x1800b6d93
cmp esi, ecx
jl 0x1800b6d69
mov edx, esi
sub edx, ecx
cmp edx, 0x400
jg 0x1800b6d69
mov rcx, rbx
call fcn.1800c29c0
mov r8d, dword [rbx + 4]
mov r9d, dword [rbx]
mov r10d, dword [rsp + 0x4f8]
cmp r12d, 0x18
jne 0x1800b5ff8
cmp r10d, 0xff000000
jne 0x1800b5ff8
lea eax, [r12 - 0x15]
jmp 0x1800b6004
test r10d, r10d
mov eax, r13d
setne al
add eax, 3
mov dword [rbx + 8], eax
test r9d, r9d
js 0x1800b6d3f
jne 0x1800b601c
lea ecx, [r9*4]
jmp 0x1800b603e
mov eax, 0x7fffffff
cdq
idiv r9d
cmp eax, 4
jl 0x1800b6d3f
lea ecx, [r9*4]
test ecx, ecx
js 0x1800b6d3f
test r8d, r8d
js 0x1800b6d3f
je 0x1800b605a
mov eax, 0x7fffffff
cdq
idiv r8d
cmp ecx, eax
jg 0x1800b6d3f
mov qword [rsp + 0x4d0], rbp
test r9d, r9d
je 0x1800b6079
mov eax, 0x7fffffff
cdq
idiv r9d
cmp eax, 4
jl 0x1800b6d1b
lea ecx, [r9*4]
test r8d, r8d
je 0x1800b6097
mov eax, 0x7fffffff
cdq
idiv r8d
cmp ecx, eax
jg 0x1800b6d1b
imul r8d, r9d
lea eax, [r8*4]
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x60], rax
mov rbp, rax
test rax, rax
je 0x1800b6d1b
cmp r12d, 0x10
jge 0x1800b66bf
mov dword [rsp + 0x4f0], r13d
mov edi, r13d
test r15d, r15d
je 0x1800b6695
cmp r15d, 0x100
jg 0x1800b6695
test r15d, r15d
jle 0x1800b623f
mov ebp, dword [rsp + 0x24]
lea rsi, [rbx + 0x30]
mov r14, r13
movsxd rdi, r15d
nop
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1800b611f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6149
cmp dword [rbx + 0x30], 0
lea rsi, [rbx + 0x30]
je 0x1800b6147
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6149
xor cl, cl
mov r13, rsi
mov byte [rsp + r14*4 + 0x92], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1800b616c
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6191
cmp dword [rsi], 0
je 0x1800b618f
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6191
xor cl, cl
mov byte [rsp + r14*4 + 0x91], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1800b61b5
movzx ecx, byte [rax]
lea rsi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b61da
cmp dword [rsi], 0
je 0x1800b61d8
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b61da
xor cl, cl
mov byte [rsp + r14*4 + 0x90], cl
cmp ebp, 0xc
je 0x1800b6212
cmp rax, qword [rbx + 0xc8]
jae 0x1800b61fc
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6212
cmp dword [r13], 0
je 0x1800b6212
mov rcx, rbx
call fcn.1800c2ae0
inc qword [rbx + 0xc0]
mov byte [rsp + r14*4 + 0x93], 0xff
inc r14
cmp r14, rdi
jl 0x1800b6100
mov edi, dword [rsp + 0x4f0]
xor r13d, r13d
mov rbp, qword [rsp + 0x60]
mov esi, dword [rsp + 0x2c]
mov r14d, dword [rsp + 0x24]
mov eax, r13d
cmp r14d, 0xc
mov rcx, rbx
setne al
add eax, 3
imul eax, r15d
sub esi, eax
sub esi, dword [rsp + 0x20]
sub esi, r14d
mov edx, esi
call fcn.1800c29c0
cmp r12d, 1
jne 0x1800b6276
mov r15d, dword [rbx]
add r15d, 7
shr r15d, 3
jmp 0x1800b6294
cmp r12d, 4
jne 0x1800b6287
mov r15d, dword [rbx]
inc r15d
shr r15d, 1
jmp 0x1800b6294
cmp r12d, 8
jne 0x1800b6632
mov r15d, dword [rbx]
mov eax, dword [rbx + 4]
neg r15d
and r15d, 3
mov ecx, eax
cmp r12d, 1
jne 0x1800b6459
mov r12d, r13d
test eax, eax
jle 0x1800b6c2b
mov rdi, r13
nop dword [rax + rax]
mov r9, qword [rbx + 0xc0]
mov esi, 7
cmp r9, qword [rbx + 0xc8]
jae 0x1800b62e5
movzx ecx, byte [r9]
inc r9
mov qword [rbx + 0xc0], r9
jmp 0x1800b630c
cmp dword [rbx + 0x30], 0
je 0x1800b630a
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
lea r9, [rax + 1]
mov qword [rbx + 0xc0], r9
jmp 0x1800b630c
xor cl, cl
mov edx, dword [rbx]
mov r14d, r13d
movzx r11d, cl
mov rcx, r9
test edx, edx
jle 0x1800b63fe
mov r8, r9
mov r10d, edx
nop word [rax + rax]
mov eax, r11d
mov ecx, esi
sar eax, cl
mov r9d, r8d
and eax, 1
lea rcx, [rax*4]
movzx eax, byte [rsp + rcx + 0x90]
mov byte [rdi + rbp], al
movzx eax, byte [rsp + rcx + 0x91]
mov byte [rdi + rbp + 1], al
movzx eax, byte [rsp + rcx + 0x92]
mov rcx, r8
mov byte [rdi + rbp + 2], al
lea eax, [r14 + 1]
mov byte [rdi + rbp + 3], 0xff
mov r14d, eax
add rdi, 4
cmp eax, edx
je 0x1800b63fe
sub esi, 1
jns 0x1800b63e2
mov esi, 7
cmp r8, qword [rbx + 0xc8]
jae 0x1800b63aa
movzx r9d, byte [r8]
lea rcx, [r8 + 1]
mov qword [rbx + 0xc0], rcx
mov edx, r10d
movzx r11d, r9b
jmp 0x1800b63ec
cmp dword [rbx + 0x30], 0
je 0x1800b63d6
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx r9d, byte [rax]
lea rcx, [rax + 1]
mov qword [rbx + 0xc0], rcx
mov edx, dword [rbx]
movzx r11d, r9b
jmp 0x1800b63ec
xor r9b, r9b
mov edx, r10d
movzx r11d, r9b
jmp 0x1800b63ec
mov rcx, qword [rbx + 0xc0]
mov edx, r10d
mov r8, rcx
mov r9d, ecx
mov r10d, edx
cmp r14d, edx
jl 0x1800b6330
test r15d, r15d
je 0x1800b6443
cmp qword [rbx + 0x10], 0
je 0x1800b6436
mov r8d, dword [rbx + 0xc8]
sub r8d, r9d
cmp r8d, r15d
jge 0x1800b6436
mov rax, qword [rbx + 0xc8]
mov edx, r15d
mov rcx, qword [rbx + 0x28]
sub edx, r8d
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
jmp 0x1800b6443
mov eax, r15d
add rax, rcx
mov qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r12d
mov ecx, eax
cmp r12d, eax
jl 0x1800b62c0
jmp 0x1800b6c2b
mov r14d, r13d
test eax, eax
jle 0x1800b6c2b
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbx]
mov esi, r13d
test r8d, r8d
jle 0x1800b65d9
nop
mov r9, qword [rbx + 0xc0]
cmp r9, qword [rbx + 0xc8]
jae 0x1800b64a0
movzx ecx, byte [r9]
inc r9
mov qword [rbx + 0xc0], r9
jmp 0x1800b64ca
cmp dword [rbx + 0x30], 0
je 0x1800b64c8
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
mov r8d, dword [rbx]
movzx ecx, byte [rax]
lea r9, [rax + 1]
mov qword [rbx + 0xc0], r9
jmp 0x1800b64ca
xor cl, cl
mov edx, gethostbyname
mov rax, rbx
movzx eax, cl
mov r10d, r13d
lea r11, [rbx + rdx]
cmp r12d, 4
jne 0x1800b64ec
mov r10d, eax
and r10d, 0xf
shr eax, 4
movsxd rcx, edi
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0x90]
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0x91]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0x92]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
lea eax, [rsi + 1]
cmp eax, r8d
je 0x1800b65d9
cmp r12d, 8
jne 0x1800b6586
cmp r9, qword [rbx + 0xc8]
jae 0x1800b6559
movzx ecx, byte [r9]
lea rax, [r9 + 1]
mov qword [rbx + 0xc0], rax
jmp 0x1800b6582
cmp dword [r11], 0
je 0x1800b6580
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
mov r8d, dword [rbx]
jmp 0x1800b6582
xor cl, cl
movzx r10d, cl
movsxd rcx, edi
add esi, 2
inc edi
mov eax, r10d
mov r9d, r8d
lea rdx, [rax*4]
movzx eax, byte [rsp + rdx + 0x90]
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0x91]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movzx eax, byte [rsp + rdx + 0x92]
movsxd rcx, edi
inc edi
mov byte [rcx + rbp], al
movsxd rax, edi
inc edi
mov byte [rax + rbp], 0xff
cmp esi, r8d
jl 0x1800b6480
test r15d, r15d
je 0x1800b661c
cmp qword [rbx + 0x10], 0
je 0x1800b6612
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r15d
jge 0x1800b6612
mov rax, qword [rbx + 0xc8]
mov edx, r15d
sub edx, ecx
mov qword [rbx + 0xc0], rax
mov rcx, qword [rbx + 0x28]
call qword [rbx + 0x18]
jmp 0x1800b661c
mov eax, r15d
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc r14d
mov ecx, eax
cmp r14d, eax
jl 0x1800b6470
jmp 0x1800b6c2b
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_bpp
mov qword [rcx + rax], rdx
xor eax, eax
mov rbp, qword [rsp + 0x4d0]
mov rdi, qword [rsp + 0x4a0]
mov rsi, qword [rsp + 0x4a8]
mov r12, qword [rsp + 0x498]
mov r14, qword [rsp + 0x490]
add rsp, 0x4b0
pop r15
pop r13
pop rbx
ret
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.invalid
jmp 0x1800b665a
sub esi, dword [rsp + 0x20]
mov rcx, rbx
sub esi, r14d
mov dword [rsp + 0x40], r13d
mov edx, esi
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x50], r13d
mov dword [rsp + 0x2c], r13d
mov dword [rsp + 0x3c], r13d
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x4c], r13d
mov dword [rsp + 0x54], r13d
call fcn.1800c29c0
cmp r12d, 0x18
jne 0x1800b6705
mov eax, dword [rbx]
lea edx, [rax + rax*2]
jmp 0x1800b6713
cmp r12d, 0x10
jne 0x1800b6711
mov edx, dword [rbx]
add edx, edx
jmp 0x1800b6713
xor edx, edx
neg edx
and edx, 3
mov dword [rsp + 0x20], edx
cmp r12d, 0x18
jne 0x1800b6732
mov r10d, 1
mov qword [rsp + 0x30], r10
jmp 0x1800b6961
mov r11d, dword [rsp + 0x38]
xor r10d, r10d
mov esi, dword [rsp + 0x28]
mov qword [rsp + 0x30], r10
cmp r12d, 0x20
jne 0x1800b679e
mov qword [rsp + 0x30], r10
cmp r11d, 0xff
jne 0x1800b679e
mov ecx, dword [rsp + 0x4f0]
mov qword [rsp + 0x30], r10
cmp esi, 0xff00
jne 0x1800b67a5
mov qword [rsp + 0x30], r10
cmp ecx, 0xff0000
jne 0x1800b67a5
mov r9d, dword [rsp + 0x4f8]
mov qword [rsp + 0x30], r10
cmp r9d, 0xff000000
jne 0x1800b67c6
mov r10d, 2
mov qword [rsp + 0x30], r10
jmp 0x1800b6961
mov ecx, dword [rsp + 0x4f0]
test ecx, ecx
je 0x1800b6cee
test esi, esi
je 0x1800b6cee
test r11d, r11d
je 0x1800b6cee
mov r9d, dword [rsp + 0x4f8]
call fcn.1800b7310
mov edx, dword [rsp + 0x4f0]
sub eax, 7
mov ecx, dword [rsp + 0x4f0]
shr edx, 1
and ecx, 0x55555555
and edx, 0x55555555
mov dword [rsp + 0x40], eax
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, esi
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r14d, al
mov dword [rsp + 0x3c], r14d
call fcn.1800b7310
sub eax, 7
mov edx, esi
shr edx, 1
mov ecx, esi
and edx, 0x55555555
mov dword [rsp + 0x48], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r11d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx esi, al
mov dword [rsp + 0x44], esi
call fcn.1800b7310
sub eax, 7
mov edx, r11d
shr edx, 1
mov ecx, r11d
and edx, 0x55555555
mov dword [rsp + 0x50], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
mov ecx, r9d
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r11d, al
mov dword [rsp + 0x4c], r11d
call fcn.1800b7310
sub eax, 7
mov edx, r9d
shr edx, 1
mov ecx, r9d
and edx, 0x55555555
mov dword [rsp + 0x2c], eax
and ecx, 0x55555555
add edx, ecx
mov ecx, edx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
mov eax, edx
shr eax, 8
add edx, eax
mov eax, edx
shr eax, 0x10
add eax, edx
movzx r15d, al
mov dword [rsp + 0x54], r15d
cmp r14d, 8
ja 0x1800b6cee
cmp esi, 8
ja 0x1800b6cee
cmp r11d, 8
ja 0x1800b6cee
cmp r15d, 8
ja 0x1800b6cee
mov edx, dword [rsp + 0x20]
mov eax, dword [rbx + 4]
xor esi, esi
mov dword [rsp + 0x24], esi
mov ecx, eax
test eax, eax
jle 0x1800b6c2b
nop dword [rax]
nop dword [rax + rax]
mov eax, dword [rbx]
movsxd rcx, r13d
test r10, r10
je 0x1800b6af9
xor r14d, r14d
test eax, eax
jle 0x1800b6bcf
mov r15d, dword [rsp + 0x4e8]
lea rsi, [rcx + rbp]
lea rdi, [rbx + 0x30]
nop dword [rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1800b69cf
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b69f9
cmp dword [rbx + 0x30], 0
lea rdi, [rbx + 0x30]
je 0x1800b69f7
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b69f9
xor cl, cl
mov byte [rsi + 2], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1800b6a14
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6a39
cmp dword [rdi], 0
je 0x1800b6a37
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6a39
xor cl, cl
mov byte [rsi + 1], cl
cmp rax, qword [rbx + 0xc8]
jae 0x1800b6a58
movzx ecx, byte [rax]
lea rdi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6a7d
cmp dword [rdi], 0
je 0x1800b6a7b
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6a7d
xor cl, cl
cmp qword [rsp + 0x30], 2
mov byte [rsi], cl
jne 0x1800b6aca
cmp rax, qword [rbx + 0xc8]
jae 0x1800b6aa3
movzx ecx, byte [rax]
lea rdi, [rbx + 0x30]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6acc
cmp dword [rdi], 0
je 0x1800b6ac6
mov rcx, rbx
call fcn.1800c2ae0
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1800b6acc
xor cl, cl
jmp 0x1800b6acc
mov cl, 0xff
movzx eax, cl
add r13d, 4
mov byte [rsi + 3], cl
or r15d, eax
add rsi, 4
inc r14d
cmp r14d, dword [rbx]
jl 0x1800b69b0
mov dword [rsp + 0x4e8], r15d
mov edi, r15d
jmp 0x1800b6bc7
xor r15d, r15d
test eax, eax
jle 0x1800b6bcf
lea r14, [rcx + rbp]
mov ebp, dword [rsp + 0x4f8]
nop
mov rcx, rbx
call fcn.1800c2730
cmp r12d, 0x10
jne 0x1800b6b22
mov esi, eax
jmp 0x1800b6b3a
mov rcx, rbx
mov edi, eax
call fcn.1800c2730
mov esi, eax
shl esi, 0x10
add esi, edi
mov edi, dword [rsp + 0x4e8]
mov r8d, dword [rsp + 0x3c]
mov ecx, esi
and ecx, dword [rsp + 0x4f0]
mov edx, dword [rsp + 0x40]
call fcn.1800b7220
mov r8d, dword [rsp + 0x44]
mov ecx, esi
and ecx, dword [rsp + 0x28]
mov edx, dword [rsp + 0x48]
mov byte [r14], al
call fcn.1800b7220
mov r8d, dword [rsp + 0x4c]
mov ecx, esi
and ecx, dword [rsp + 0x38]
mov edx, dword [rsp + 0x50]
mov byte [r14 + 1], al
call fcn.1800b7220
mov byte [r14 + 2], al
test ebp, ebp
je 0x1800b6b9c
mov r8d, dword [rsp + 0x54]
and esi, ebp
mov edx, dword [rsp + 0x2c]
mov ecx, esi
call fcn.1800b7220
jmp 0x1800b6ba1
mov eax, 0xff
or edi, eax
mov byte [r14 + 3], al
add r14, 4
mov dword [rsp + 0x4e8], edi
add r13d, 4
inc r15d
cmp r15d, dword [rbx]
jl 0x1800b6b10
mov rbp, qword [rsp + 0x60]
mov esi, dword [rsp + 0x24]
mov edx, dword [rsp + 0x20]
test edx, edx
je 0x1800b6c10
cmp qword [rbx + 0x10], 0
je 0x1800b6c07
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x1800b6c07
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + 0x18]
mov edx, dword [rsp + 0x20]
jmp 0x1800b6c10
mov eax, edx
add qword [rbx + 0xc0], rax
mov eax, dword [rbx + 4]
inc esi
mov r10, qword [rsp + 0x30]
mov ecx, eax
mov dword [rsp + 0x24], esi
cmp esi, eax
jl 0x1800b6980
xor r13d, r13d
cmp dword [rsp + 0x4e8], 0
jne 0x1800b6c53
imul eax, dword [rbx]
lea eax, [rax*4 - 1]
movsxd rdx, eax
test eax, eax
js 0x1800b6c53
mov byte [rdx + rbp], 0xff
sub rdx, 4
jns 0x1800b6c46
mov ecx, dword [rbx + 4]
cmp dword [rsp + 0x58], 0
jle 0x1800b6cd0
mov r10d, r13d
mov edx, ecx
test ecx, 0xfffffffe
jle 0x1800b6cd0
nop word [rax + rax]
mov ecx, dword [rbx]
sub edx, r10d
dec edx
mov r9d, r10d
imul edx, ecx
mov r8d, r13d
imul r9d, ecx
lea eax, [rcx*4]
shl edx, 2
shl r9d, 2
add rdx, rbp
add r9, rbp
test eax, eax
jle 0x1800b6cbf
sub r9, rdx
nop
movzx eax, byte [rdx]
inc r8d
movzx ecx, byte [rdx + r9]
mov byte [rdx + r9], al
mov byte [rdx], cl
lea rdx, [rdx + 1]
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x1800b6ca0
mov ecx, dword [rbx + 4]
inc r10d
mov eax, ecx
mov edx, ecx
sar eax, 1
cmp r10d, eax
jl 0x1800b6c70
mov eax, dword [rbx]
mov rdx, qword [rsp + 0x4d8]
mov dword [rdx], eax
mov rax, qword [rsp + 0x4e0]
mov dword [rax], ecx
mov rax, rbp
jmp 0x1800b6660
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_masks
jmp 0x1800b665a
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x1800b665a
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.too_large
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x1800b6668
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_offset
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x1800b6668
mov edx, dword [0x180148994]
mov rax, qword gs:[0x58]
mov ecx, 0x28
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_header
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x1800b6668