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

Disassembly:
mov dword [rsp + 0x20], r9d
push rsi
push rdi
push r12
push r15
sub rsp, 0x88
movzx eax, byte [rcx]
mov r15, r8
mov esi, edx
mov rdi, rcx
test al, al
je 0x14004a567
cmp dword [rcx + 0x38], 0
jle 0x14004a567
xor eax, eax
add rsp, 0x88
pop r15
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0x80], rbp
xor ebp, ebp
mov qword [rsp + 0x70], r14
mov qword [rcx + 0x3c], rbp
mov dword [rcx + 0xf8], ebp
mov qword [rcx + 0x110], rbp
mov qword [rcx + 0x100], rbp
mov qword [rcx + 0x108], rbp
mov qword [rcx + 0x118], rbp
mov dword [rcx + 0x38], 0xffffffff
test al, al
jne 0x14004a605
mov word [rcx], 1
lea rdx, [rcx + 0x98]
mov dword [rcx + 0x124], 1
mov byte [rcx + 2], bpl
mov dword [rcx + 0x4c], ebp
mov qword [rcx + 0xd0], rbp
mov byte [rcx + 0x128], bpl
mov rax, qword [0x1402437e8]
mov ecx, dword [0x140c74ec8]
call qword [rax + 0x40]
lea rcx, [rdi + 0x98]
mov qword [rdi + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rdi + 0xc8], rbp
xor edx, edx
mov qword [rsp + 0x78], r13
lea rcx, [rsi + 0xda]
mov qword [rdi + 8], r15
mov rax, r15
mov dword [rdi + 0x10], esi
div rcx
mov ecx, 0x80
cmp dword [rsp + 0xd8], ecx
mov rbx, rax
cmova ecx, dword [rsp + 0xd8]
dec ecx
mov eax, ecx
shr eax, 1
or ecx, eax
mov eax, ecx
shr eax, 2
or ecx, eax
mov eax, ecx
shr eax, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or ecx, eax
mov r14d, ecx
shr r14d, 0x10
or r14d, ecx
inc r14d
mov dword [rsp + 0xb0], r14d
cmp ebx, 8
jb 0x14004a8c5
lea r10d, [r14 + r14]
mov qword [rsp + 0x60], r10
nop dword [rax + rax]
lea ecx, [rbx - 1]
mov eax, ecx
shr eax, 1
or ecx, eax
mov eax, ecx
shr eax, 2
or ecx, eax
mov eax, ecx
shr eax, 4
or ecx, eax
mov eax, ecx
shr eax, 8
or ecx, eax
mov eax, ecx
shr eax, 0x10
or eax, ecx
lea ecx, [rax*2 + 2]
lea eax, [rbx + rbx*4]
mov dword [rdi + 0x28], ecx
shr eax, 2
cmp ecx, eax
jae 0x14004a6be
add ecx, ecx
mov dword [rdi + 0x28], ecx
mov r9d, dword [rdi + 0x10]
lea r13d, [rbx + rbx]
mov eax, ebx
lea rsi, [r13*2]
add rsi, r13
mov edx, ecx
add rdx, r10
shl rsi, 4
shl rdx, 3
lea r8, [r9 + 0x70]
imul rax, r8
add rax, rdx
add rax, rsi
cmp rax, r15
jbe 0x14004a70b
cmp ebx, 8
jbe 0x14004a70b
dec ebx
mov eax, ebx
imul rax, r8
add rax, rsi
add rax, rdx
cmp rax, r15
ja 0x14004a6f3
mov ebp, ebx
xor edx, edx
imul r9, rbp
mov rcx, r9
call fcn.14003c9a0
mov qword [rdi + 0x80], rax
test rax, rax
je 0x14004a7a3
mov r10d, dword [rdi + 0x28]
lea rcx, [rdi + 0xe8]
imul r8, rbp, 0x70
mov r11d, r14d
lea rax, [rdi + 0xf0]
shl r11, 3
lea rdx, [rdi + 0x60]
xor ebp, ebp
shl r10, 3
mov qword [rsp + 0x58], rbp
lea r14, [rdi + 0x78]
mov qword [rsp + 0x50], r11
lea r9, [rdi + 0x58]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r11
mov qword [rsp + 0x38], rcx
lea ecx, [rbp + 0x20]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rdx
mov rdx, r14
mov qword [rsp + 0x20], r10
call fcn.140046bd0
test rax, rax
jne 0x14004a7ca
mov rcx, qword [rdi + 0x80]
call fcn.14003c950
mov qword [rdi + 0x80], rbp
jmp 0x14004a7a9
lea r14, [rdi + 0x78]
xor ebp, ebp
cmp ebx, 8
jb 0x14004a85d
mov r14d, dword [rsp + 0xb0]
mov r10, qword [rsp + 0x60]
shr ebx, 2
lea ebx, [rbx + rbx*2]
jmp 0x14004a680
mov eax, dword [rsp + 0xc8]
mov dword [rdi + 0x40], ebx
mov dword [rdi + 0x38], ebx
mov dword [rdi + 0x30], r13d
mov dword [rdi + 0x34], ebp
mov qword [rdi + 0x68], rbp
mov qword [rdi + 0x44], rbp
mov dword [rdi + 0x3c], ebp
mov dword [rdi + 0xf8], ebp
mov dword [rdi + 0x50], ebp
mov qword [rdi + 0x88], rbp
mov qword [rdi + 0x90], rbp
mov qword [rdi + 0x70], rbp
mov qword [rdi + 0x20], rbp
test eax, eax
je 0x14004a81f
mov ecx, ebx
imul ecx, eax
mov eax, 0x51eb851f
mul ecx
shr edx, 5
inc edx
jmp 0x14004a821
mov edx, ebx
mov ecx, dword [rsp + 0xd0]
mov dword [rdi + 0x14], edx
test ecx, ecx
je 0x14004a83e
imul ebx, ecx
mov eax, 0x51eb851f
mul ebx
mov ebx, edx
shr ebx, 5
mov eax, dword [rsp + 0xb0]
mov dword [rdi + 0x2c], eax
mov al, 1
mov dword [rdi + 0x18], ebx
mov qword [rdi + 0xd8], rbp
mov qword [rdi + 0xe0], rbp
jmp 0x14004a8c7
call fcn.14003bf20
mov edx, 0x1000
mov ecx, 5
mov dword [rax], 0xc
imul ebx, dword [rdi + 0x10]
mov r8d, ebx
call fcn.14003bc20
call fcn.14003bf20
mov rcx, qword [rdi + 0x80]
mov ebx, dword [rax]
mov dword [rdi + 0x38], ebp
mov dword [rdi + 0x120], ebp
test rcx, rcx
je 0x14004a8a6
call fcn.14003c950
mov qword [rdi + 0x80], rbp
mov rcx, qword [r14]
test rcx, rcx
je 0x14004a8b6
call fcn.14003c950
mov qword [r14], rbp
call fcn.14003bf20
mov dword [rax], ebx
xor eax, eax
mov byte [rdi + 3], 0
jmp 0x14004a8da
xor al, al
mov byte [rdi + 3], al
mov eax, dword [rdi + 0x38]
test eax, eax
mov ecx, eax
cmovle ecx, ebp
mov dword [rdi + 0x120], ecx
mov r13, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
mov rbx, qword [rsp + 0xb8]
mov r14, qword [rsp + 0x70]
add rsp, 0x88
pop r15
pop r12
pop rdi
pop rsi
ret