Function at 0x140021860
Capabilities:
Access pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rax, qword [0x140398f48]
mov rdi, r8
mov r12d, edx
mov rbx, rcx
xor edx, edx
movzx r8d, word [rax + 0x16]
call fcn.14024c480
mov rcx, rdi
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov rsi, rax
test rax, rax
je case.default.0x140021928
mov r8, qword gs:[0x30]
xor r14d, r14d
xor bpl, bpl
xor r13b, r13b
mov r15d, r14d
lea r9d, [r14 + 1]
mov rdx, qword [r8 + 0x60]
mov rax, qword [rdx + 0x30]
mov qword [rsp + 0x30], rax
cmp dword [rsi + 0xfc], r14d
je 0x1400218f8
mov eax, dword [rsi + 0xf8]
test eax, eax
je 0x1400218f8
test byte [rax + rdi + 0x10], r9b
movzx r13d, r9b
cmovne r15d, r9d
mov rdx, qword [0x140398f48]
movzx eax, byte [rdx + 0x14]
dec eax
cmp eax, 8
ja case.default.0x140021928
lea r8, [0x140000000]
cdqe
mov ecx, dword [r8 + rax*4 + 0x21bf4]
add rcx, r8
mov r8d, 0xe0
jmp rcx
mov eax, dword [rsi + 0x58]
mov dword [rbx + 0x120], eax
mov dword [rbx + 0x114], r9d
call fcn.140024150
lea rcx, [rbx + 0x100]
mov ebp, eax
call qword [0x140398fe8]
mov rcx, qword [rsi + 0x30]
xor edx, edx
mov qword [rbx + 0xf8], rcx
mov rcx, qword [rsp + 0x88]
call fcn.140021c20
mov dword [rbx + 0x108], eax
mov dword [rbx + 0x10c], 4
mov rcx, qword [0x140398f48]
mov rdx, qword [rcx + 0x48]
mov r11, qword [rdx]
test r11, r11
je case.default.0x140021928
mov rcx, qword [r11]
sub rcx, 0xc8
xor r8b, r8b
nop dword [rax]
cmp rdi, qword [rcx + 0x30]
jae 0x1400219be
lea rdx, [rcx + 0xc8]
mov rax, qword [rdx]
test rax, rax
je 0x1400219df
lea rcx, [rax - 0xc8]
jmp 0x1400219a0
jbe 0x140021a0e
mov rax, qword [rcx + 0xd0]
test rax, rax
je 0x1400219d5
lea rcx, [rax - 0xc8]
jmp 0x1400219a0
mov r8b, 1
lea rdx, [rcx + 0xc8]
xor eax, eax
lea r9, [rbx + 0xc8]
xorps xmm0, xmm0
movups xmmword [r9], xmm0
mov qword [r9 + 0x10], rax
mov rax, qword [0x140398f48]
mov r10, qword [rax + 0x48]
mov rax, qword [r10 + 0x10]
test rax, rax
je 0x140021a34
mov rcx, r11
call rax
jmp 0x140021a34
mov rax, qword [rcx + 0x98]
inc dword [rax + 0x18]
mov rax, qword [0x140398f48]
cmp dword [rax + 8], 0xa
je 0x140021a2e
seta r14b
test r14d, r14d
je 0x140021a34
inc dword [rcx + 0x114]
mov rcx, qword [rsp + 0x30]
mov edx, 8
lea r8d, [rdx + 0x48]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov qword [rbx + 0x98], rax
test rax, rax
je case.default.0x140021928
mov qword [rbx + 0xa8], rax
lea rcx, [rbx + 0xa0]
mov qword [rcx], rax
mov r9d, 1
mov qword [rax], rcx
mov rax, qword [rbx + 0x98]
mov qword [rax + 8], rcx
mov rax, qword [rbx + 0x98]
mov dword [rax + 0x38], 9
mov rax, qword [rbx + 0x98]
mov dword [rax + 0x18], r9d
test ebp, ebp
je 0x140021aa5
mov rax, qword [rbx + 0x98]
mov dword [rax + 0x1c], r9d
mov ecx, dword [rbx + 0x68]
lea eax, [r15*4]
shl r12d, 9
btr ecx, 0x13
not r12d
movzx edx, r13b
and edx, 0xfffffffb
or ecx, 0x40cc
xor r12d, ecx
or edx, eax
and r12d, 0x200
shl edx, 0x16
xor r12d, ecx
movzx ebp, r9b
and r12d, 0xfebfffff
mov r8d, 0xe0
or edx, r12d
mov dword [rbx + 0x68], edx
mov rdx, qword [0x140398f48]
cmp word [rdx + 0x16], r8w
jne case.0x140021928.2
mov rax, qword [rsi + 0x30]
lea rcx, [rbx + 0xd8]
mov qword [rbx + 0xd0], rax
call qword [0x140398fe8]
mov rdx, qword [0x140398f48]
mov r8d, 0xe0
movzx eax, word [rdx + 0x16]
mov ecx, reloc.OLEAUT32.dll_SetErrorInfo
cmp ax, cx
je 0x140021b38
cmp ax, r8w
jne 0x140021b62
lea rax, [rbx + 0x98]
mov qword [rax + 8], rax
mov qword [rax], rax
lea rax, [rbx + 0xb8]
mov qword [rax + 8], rax
mov qword [rax], rax
lea rax, [rbx + 0xa8]
mov qword [rax + 8], rax
mov qword [rax], rax
mov r9d, 1
mov qword [rbx + 0x30], rdi
mov eax, dword [rsi + 0x50]
mov dword [rbx + 0x40], eax
mov eax, dword [rsi + 8]
mov dword [rbx + 0x80], eax
mov rax, qword [rsp + 0x88]
movups xmm0, xmmword [rax]
mov rax, qword [rsp + 0x90]
movups xmmword [rbx + 0x58], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rbx + 0x48], xmm0
mov eax, dword [rsi + 0x28]
add rax, rdi
mov word [rbx + 0x6c], r9w
mov qword [rbx + 0x38], rax
test bpl, bpl
jne 0x140021bc0
mov dword [rbx + 0x68], 0xc004
test r13b, r13b
je 0x140021bc0
mov dword [rbx + 0x68], 0x40c004
lea rcx, [rbx + 0x70]
mov eax, r9d
mov qword [rcx + 8], rcx
mov qword [rcx], rcx
jmp 0x140021bd2
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret