Function at 0x100097958
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov ebp, dword [rsp + 0xf0]
mov r15, rdx
mov rdx, r8
mov rbx, r8
mov r12, rcx
mov byte [rcx + 0x18], 1
mov dword [rcx + 0x3c], ebp
mov dword [rcx + 0x38], r9d
call fcn.10007c114
test byte [rbx + 0x89], 2
mov edi, eax
mov dword [rsp + 0x40], eax
je 0x1000979c2
lea rdx, [0x100007160]
xor r8d, r8d
mov rcx, rbx
call fcn.100055880
mov r14, rax
jmp 0x1000979cc
mov rax, qword [0x100007188]
mov r14, qword [rax]
mov rax, qword [r14 + 8]
xor r13d, r13d
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x34], r13d
cmp qword [r12 + 0x48], r13
je 0x100097a43
mov edi, r13d
cmp dword [r12 + 0x40], r13d
jbe 0x100097a26
mov rbx, r13
mov rax, qword [r12 + 0x48]
mov rsi, qword [rbx + rax + 0x10]
cmp rsi, r13
je 0x100097a19
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
inc edi
add rbx, 0x20
cmp edi, dword [r12 + 0x40]
jb 0x1000979f6
mov rbx, qword [r12 + 0x48]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [rsp + 0x40]
mov dword [r12 + 0x40], r13d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [r12 + 0x48], rax
cmp rax, r13
jne 0x100097aa7
mov r13d, 0xffffff80
mov ecx, dword [r14]
mov eax, ecx
and eax, r13d
cmp eax, r13d
je 0x100097a9b
mov eax, ecx
not ecx
and eax, r13d
and ecx, 0x7f
dec eax
xor eax, ecx
mov dword [r14], eax
test r13d, eax
jne 0x100097a9b
mov rcx, r14
call fcn.100059224
mov rax, qword [0x100019918]
jmp 0x1000980ae
xor ebx, ebx
mov ecx, r13d
mov dword [rsp + 0xd0], r13d
mov esi, r13d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x5c], r13d
lea r13d, [rbx - 0x80]
mov dword [rsp + 0x48], ecx
cmp edi, ebx
jbe 0x100098059
mov r11d, ecx
inc dword [r12 + 0x40]
cmp dword [r12 + 0x40], 1
jbe 0x100097b1e
mov edi, dword [r12 + 0x40]
mov rbx, qword [r12 + 0x48]
shl rdi, 5
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r9, rdi
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
xor edi, edi
cmp rax, rdi
je 0x10009800b
mov r11d, dword [rsp + 0x34]
mov qword [r12 + 0x48], rax
mov ecx, dword [r12 + 0x40]
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0xe0]
dec ecx
mov r8d, r11d
shl rcx, 5
add rcx, qword [r12 + 0x48]
mov qword [rsp + 0x60], rcx
mov rcx, r12
call fcn.10007c210
mov r8d, dword [rsp + 0xe8]
lea rdx, [rsp + 0x50]
mov rbx, rax
mov rax, qword [rsp + 0xf8]
mov r9d, ebp
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.10005ae94
test byte [rbx + 0x89], 0x20
je 0x100097b93
lea rdx, [0x1000075a8]
xor r8d, r8d
mov rcx, rbx
call fcn.100055880
mov rcx, rax
jmp 0x100097b9d
mov rax, qword [0x1000075d0]
mov rcx, qword [rax]
mov eax, dword [rcx + 0x14]
mov edx, dword [rcx]
mov ebx, dword [rcx + 8]
mov ebp, dword [rcx + 0x10]
mov dword [rsp + 0x3c], eax
mov eax, edx
and eax, r13d
cmp eax, r13d
je 0x100097bd0
mov eax, edx
not edx
and eax, r13d
and edx, 0x7f
dec eax
xor eax, edx
mov dword [rcx], eax
test r13d, eax
jne 0x100097bd0
call fcn.100059224
mov r8, qword [rsp + 0x60]
mov r9d, dword [rsp + 0x38]
mov r11d, dword [rsp + 0x34]
mov rdi, qword [rsp + 0x50]
xor ecx, ecx
mov dword [r8 + 8], r9d
mov dword [r8 + 0xc], 1
mov dword [r8 + 0x18], r11d
mov qword [r8 + 0x10], rcx
cmp byte [r12 + 0x20], cl
je 0x100097c6f
cmp dword [r12 + 0x40], 1
jbe 0x100097c3b
mov eax, dword [r12 + 0x24]
cmp eax, ecx
je 0x100097c34
cmp eax, 3
je 0x100097c34
cmp eax, 2
jne 0x100097c2f
lea eax, [rdi + 1]
cdq
sub eax, edx
sar eax, 1
add eax, ebx
mov dword [rsp + 0xd0], eax
jmp 0x100097c3b
lea eax, [rdi + rbx]
jmp 0x100097c26
mov dword [rsp + 0xd0], ebx
cmp dword [r12 + 0x24], 1
je 0x100097c69
cmp dword [r12 + 0x24], 3
je 0x100097c69
cmp dword [r12 + 0x24], 2
jne 0x100097c64
mov eax, edi
cdq
sub eax, edx
sar eax, 1
lea esi, [rbp + rax]
mov dword [rsp + 0x30], esi
jmp 0x100097c6f
lea esi, [rdi + rbp]
jmp 0x100097c5e
mov esi, ebp
mov dword [rsp + 0x30], ebp
mov ebx, dword [rsp + 0x40]
mov r10d, dword [rsp + 0x54]
inc r11d
mov dword [rsp + 0x44], r10d
mov dword [rsp + 0x34], r11d
cmp r11d, ebx
jae 0x100097f3e
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0xe0]
mov r8d, r11d
mov rcx, r12
call fcn.10007c210
mov r9d, dword [rsp + 0xf0]
mov r8d, dword [rsp + 0xe8]
mov rbp, rax
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0xf8]
lea rdx, [rsp + 0x80]
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.10005ae94
test byte [rbp + 0x89], 0x20
mov rbx, qword [rax]
mov qword [rsp + 0x50], rbx
je 0x100097d03
lea rdx, [0x1000075a8]
xor r8d, r8d
mov rcx, rbp
call fcn.100055880
mov rcx, rax
jmp 0x100097d0d
mov rax, qword [0x1000075d0]
mov rcx, qword [rax]
mov eax, dword [rcx + 8]
mov edx, dword [rcx]
mov ebp, dword [rcx + 0xc]
mov dword [rsp + 0x4c], eax
mov eax, dword [rcx + 0x10]
mov dword [rsp + 0x58], eax
mov eax, dword [rcx + 0x14]
mov dword [rsp + 0x68], eax
mov eax, edx
and eax, r13d
cmp eax, r13d
je 0x100097d4b
mov eax, edx
not edx
and eax, r13d
and edx, 0x7f
dec eax
xor eax, edx
mov dword [rcx], eax
test r13d, eax
jne 0x100097d4b
call fcn.100059224
mov eax, dword [rsp + 0x3c]
mov ecx, dword [rsp + 0x54]
mov r10d, dword [rsp + 0x44]
cmp eax, ebp
cmovg ebp, eax
cmp byte [r12 + 0x20], 0
mov dword [rsp + 0x3c], ebp
je 0x100097d7c
lea eax, [rcx + rbp]
add eax, r10d
cmp eax, dword [rsp + 0xf0]
jg 0x100097f2b
lea eax, [rcx + rbp]
mov ecx, dword [rsp + 0xf0]
add eax, r10d
cmp eax, ecx
jle 0x100097dc5
mov rax, qword [rsp + 0xf8]
mov r8d, dword [rsp + 0xe8]
mov r9d, ecx
mov rcx, qword [rsp + 0x78]
sub r9d, ebp
lea rdx, [rsp + 0x88]
sub r9d, r10d
mov qword [rsp + 0x20], rax
call fcn.10005ae94
mov rbx, qword [rax]
mov qword [rsp + 0x50], rbx
mov rcx, qword [rsp + 0x60]
cmp dword [rcx + 0xc], 1
jne 0x100097dfc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx - 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r8, qword [rsp + 0x60]
mov qword [r8 + 0x10], rax
test rax, rax
je 0x100097a70
jmp 0x100097e37
mov ebp, dword [rcx + 0xc]
mov rsi, qword [rcx + 0x10]
shl rbp, 2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r9, rbp
mov r8, rsi
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x100097a70
mov r8, qword [rsp + 0x60]
mov ebp, dword [rsp + 0x3c]
mov qword [r8 + 0x10], rax
mov r10d, dword [rsp + 0x44]
mov ecx, dword [r8 + 0xc]
mov rax, qword [r8 + 0x10]
lea edx, [rbp + r10]
dec ecx
mov dword [rax + rcx*4], edx
inc dword [r8 + 0xc]
cmp edi, ebx
mov eax, ebx
cmovg eax, edi
mov edi, eax
mov eax, dword [rsp + 0x54]
add eax, ebp
xor ebp, ebp
add r10d, eax
mov dword [rsp + 0x44], r10d
cmp byte [r12 + 0x20], bpl
je 0x100097efe
cmp dword [r12 + 0x40], 1
jbe 0x100097ebd
mov eax, dword [r12 + 0x24]
cmp eax, ebp
je 0x100097ea6
cmp eax, 3
je 0x100097ea6
mov ecx, dword [rsp + 0x4c]
cmp eax, 2
jne 0x100097ea1
lea eax, [rbx + 1]
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x100097eaa
lea eax, [rbx + rcx]
jmp 0x100097eaa
mov eax, dword [rsp + 0x4c]
mov ecx, dword [rsp + 0xd0]
cmp ecx, eax
cmovg eax, ecx
mov dword [rsp + 0xd0], eax
cmp dword [r12 + 0x24], 1
je 0x100097ee9
cmp dword [r12 + 0x24], 3
je 0x100097ee9
cmp dword [r12 + 0x24], 2
mov ecx, dword [rsp + 0x58]
jne 0x100097ee4
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x100097eed
lea eax, [rbx + rcx]
jmp 0x100097eed
mov eax, dword [rsp + 0x58]
mov esi, dword [rsp + 0x30]
cmp esi, eax
cmovg eax, esi
mov esi, eax
mov dword [rsp + 0x30], eax
jmp 0x100097f02
mov esi, dword [rsp + 0x30]
mov r11d, dword [rsp + 0x34]
mov ebx, dword [rsp + 0x40]
mov eax, dword [rsp + 0x68]
inc r11d
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x34], r11d
cmp r11d, ebx
jb 0x100097c8e
mov r9d, dword [rsp + 0x38]
jmp 0x100097f40
mov r8, qword [rsp + 0x60]
mov r9d, dword [rsp + 0x38]
mov r11d, dword [rsp + 0x34]
mov ebx, dword [rsp + 0x40]
xor ebp, ebp
mov ecx, dword [rsp + 0x48]
mov eax, r10d
cmp ecx, r10d
cmovg eax, ecx
mov ecx, eax
mov dword [rsp + 0x48], eax
cmp byte [r12 + 0x20], bpl
je 0x100097fe8
mov eax, dword [r12 + 0x24]
mov ecx, dword [rsp + 0xd0]
cmp eax, 2
jne 0x100097f9e
lea eax, [rdi + 1]
cdq
sub eax, edx
sar eax, 1
neg eax
add ecx, eax
mov eax, edi
cmovs ecx, ebp
cdq
sub eax, edx
mov dword [rsp + 0xd0], ecx
sar eax, 1
neg eax
add esi, eax
mov dword [rsp + 0x30], esi
jns 0x100097fc6
mov esi, ebp
mov dword [rsp + 0x30], ebp
jmp 0x100097fc6
cmp eax, 1
jne 0x100097fb9
sub ecx, edi
mov dword [rsp + 0xd0], ecx
jns 0x100097fc6
mov ecx, ebp
mov dword [rsp + 0xd0], ecx
jmp 0x100097fc6
cmp eax, ebp
jne 0x100097fc6
sub esi, edi
cmovs esi, ebp
mov dword [rsp + 0x30], esi
cmp dword [r12 + 0x40], 1
jbe 0x100097fe0
mov edx, dword [rsp + 0x5c]
mov eax, ecx
cmp edx, ecx
cmovg eax, edx
add dword [r8 + 8], eax
add r9d, eax
mov ecx, dword [rsp + 0x48]
mov dword [rsp + 0x5c], esi
mov ebp, dword [rsp + 0xf0]
add r9d, edi
mov dword [r8], r10d
mov dword [rsp + 0x38], r9d
mov dword [r8 + 4], edi
cmp r11d, ebx
jb 0x100097ad4
xor ebx, ebx
jmp 0x10009805c
mov ecx, dword [r14]
mov eax, ecx
and eax, r13d
cmp eax, r13d
je 0x100098036
mov eax, ecx
not ecx
and eax, r13d
and ecx, 0x7f
dec eax
xor eax, ecx
mov dword [r14], eax
test r13d, eax
jne 0x100098036
mov rcx, r14
call fcn.100059224
mov rbx, qword [r12 + 0x48]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [r12 + 0x48], rdi
jmp 0x100097a9b
mov r9d, ecx
mov eax, dword [rsp + 0xe8]
cmp ecx, ebp
cmovl ebp, ecx
cmp r9d, eax
cmovl eax, r9d
mov dword [r12 + 0x34], ebp
mov dword [r12 + 0x30], eax
mov ecx, dword [r14]
mov eax, ecx
and eax, r13d
cmp eax, r13d
je 0x1000980a4
mov eax, ecx
not ecx
and eax, r13d
and ecx, 0x7f
dec eax
xor eax, ecx
mov dword [r14], eax
test r13d, eax
jne 0x1000980a4
mov rcx, r14
call fcn.100059224
mov rax, qword [r12 + 0x30]
mov byte [r12 + 0x18], bl
mov rbx, qword [rsp + 0xd8]
mov qword [r15], rax
mov rax, r15
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret