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

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov rax, qword [0x140008010]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov r9, qword [rdx]
movabs rax, 0xffffffff00000000
mov r14d, dword [rdx + 0x50]
mov r13, rdx
neg r14d
movzx ebx, word [r9 + 0x14]
mov rcx, qword [r9 + 0x30]
add rbx, r9
and rcx, rax
mov qword [rsp + 0x20], rcx
mov r11d, dword [rbx + 0x20]
mov eax, dword [rbx + 0x28]
or r11, rcx
and r14, r11
test eax, eax
jne 0x140003583
mov ecx, dword [rbx + 0x3c]
test cl, 0x40
je 0x140003576
mov eax, dword [r9 + 0x20]
jmp 0x14000357e
test cl, cl
jns 0x14000357e
mov eax, dword [r9 + 0x24]
mov rcx, qword [rsp + 0x20]
mov r10d, dword [rbx + 0x3c]
lea rdx, [0x1400055e0]
mov edi, 1
mov qword [rsp + 0x70], rbp
mov r12d, edi
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x88], r15
cmp di, word [r9 + 6]
jae 0x140003704
add rbx, 0x64
nop word [rax + rax]
mov r8d, dword [r13 + 0x50]
mov edi, r8d
mov ebp, dword [rbx - 0x1c]
neg edi
mov esi, dword [rbx - 0x14]
or rbp, rcx
and rdi, rbp
test esi, esi
jne 0x1400035ee
mov ecx, dword [rbx]
test cl, 0x40
je 0x1400035e6
mov esi, dword [r9 + 0x20]
jmp 0x1400035ee
test cl, cl
jns 0x1400035ee
mov esi, dword [r9 + 0x24]
cmp r14, rdi
je 0x1400036b6
mov r15d, eax
lea rcx, [r15 + r11]
cmp rcx, rdi
ja 0x1400036b6
test eax, eax
je 0x1400036a5
bt r10d, 0x19
jae 0x140003654
cmp r11, r14
jne 0x1400036a5
cmp dword [r9 + 0x38], r8d
je 0x14000362e
xor edx, edx
div r8d
test edx, edx
jne 0x1400036a5
mov r8d, 0x4000
mov rdx, r15
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r10d, dword [rbx]
mov r11, rbp
mov r9, qword [r13]
mov eax, esi
mov r14, rdi
jmp 0x1400036de
mov ecx, r10d
lea r9, [rsp + 0x28]
shr rcx, 0x1d
mov eax, r10d
shr rax, 0x1e
and ecx, 1
and eax, 1
lea rcx, [rax + rcx*2]
mov eax, r10d
shr rax, 0x1f
lea rcx, [rax + rcx*2]
mov r8d, dword [rdx + rcx*4]
bts r8d, 9
and r10d, 0x4000000
cmove r8d, dword [rdx + rcx*4]
mov rdx, r15
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400037ae
mov r10d, dword [rbx]
mov r11, rbp
mov r9, qword [r13]
mov r14, rdi
mov eax, esi
jmp 0x1400036de
mov r8d, r10d
mov eax, ebp
or r8d, dword [rbx]
sub eax, r11d
and r10d, dword [rbx]
add eax, esi
bt r10d, 0x19
mov edx, r8d
mov r10d, r8d
setb cl
btr edx, 0x19
test cl, cl
cmove r10d, edx
movzx ecx, word [r9 + 6]
lea rdx, [0x1400055e0]
inc r12d
add rbx, 0x28
cmp r12d, ecx
mov rcx, qword [rsp + 0x20]
jl 0x1400035c0
mov edi, 1
test eax, eax
je 0x140003725
bt r10d, 0x19
jae 0x140003756
cmp r11, r14
jne 0x140003725
mov edx, eax
mov r8d, 0x4000
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
mov r15, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140003f30
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
mov edx, r10d
lea r9, [rsp + 0x28]
shr rdx, 0x1d
mov ecx, r10d
shr rcx, 0x1e
and edx, 1
and ecx, 1
lea rdx, [rcx + rdx*2]
mov ecx, r10d
shr rcx, 0x1f
lea rdx, [rcx + rdx*2]
lea rcx, [0x1400055e0]
mov ecx, dword [rcx + rdx*4]
mov r8d, ecx
bts r8d, 9
mov edx, eax
and r10d, 0x4000000
cmove r8d, ecx
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140003725
xor eax, eax
jmp 0x140003727