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

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test r8, r8
mov rsi, rcx
mov edi, edx
je 0x4aeed0
cmp byte [r8], 0x31
jne 0x4aeed0
cmp r9d, 0x58
jne 0x4aeed0
test rcx, rcx
je 0x4aecf7
mov rax, qword [rcx + 0x30]
mov qword [rcx + 0x20], 0
test rax, rax
je 0x4aeea0
cmp qword [rsi + 0x38], 0
je 0x4aeec0
cmp edi, 0xffffffff
je 0x4aed04
cmp edi, 9
ja 0x4aecf7
mov rcx, qword [rsi + 0x40]
mov r8d, 0x1718
mov edx, 1
call rax
test rax, rax
mov rbx, rax
je 0x4aef10
movdqa xmm0, xmmword [0x00517270]
mov r8d, 2
mov edx, 0x8000
mov qword [rsi + 0x28], rax
mov rcx, qword [rsi + 0x40]
movups xmmword [rax + 0x74], xmm0
mov qword [rax], rsi
mov dword [rax + 8], 0x2a
mov dword [rax + 0x2c], 1
mov qword [rax + 0x30], 0
mov dword [rax + 0x48], 0xf
mov dword [rax + 0x44], 0x8000
mov dword [rax + 0x4c], 0x7fff
call qword [rsi + 0x30]
mov edx, dword [rbx + 0x44]
mov rcx, qword [rsi + 0x40]
mov r8d, 2
mov qword [rbx + 0x50], rax
call qword [rsi + 0x30]
mov edx, dword [rbx + 0x74]
mov rcx, qword [rsi + 0x40]
mov r8d, 2
mov qword [rbx + 0x60], rax
call qword [rsi + 0x30]
mov rcx, qword [rsi + 0x40]
mov edx, 0x4000
mov qword [rbx + 0x68], rax
mov dword [rbx + 0x1714], 0
mov dword [rbx + 0x16f0], 0x4000
mov r8d, 4
call qword [rsi + 0x30]
mov edx, dword [rbx + 0x16f0]
cmp qword [rbx + 0x50], 0
mov qword [rbx + 0x10], rax
lea ecx, [rdx*4]
mov dword [rbx + 0x18], ecx
je 0x4aeee0
cmp qword [rbx + 0x60], 0
je 0x4aeee0
cmp qword [rbx + 0x68], 0
je 0x4aeee0
test rax, rax
je 0x4aeee0
mov ecx, edx
mov byte [rbx + 0x3c], 8
mov dword [rbx + 0xac], edi
add rax, rcx
cmp qword [rsi + 0x30], 0
mov dword [rbx + 0xb0], 0
mov qword [rbx + 0x16e8], rax
lea eax, [rdx + rdx*2 - 3]
mov dword [rbx + 0x16f8], eax
je 0x4aecf7
cmp qword [rsi + 0x38], 0
je 0x4aecf7
mov rbx, qword [rsi + 0x28]
test rbx, rbx
je 0x4aecf7
cmp rsi, qword [rbx]
je 0x4aed10
mov eax, 0xfffffffe
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov edi, 6
jmp 0x4aebb4
mov edx, dword [rbx + 8]
movabs rax, 0x2002000088008001
lea ecx, [rdx - 0x2a]
shr rax, cl
cmp ecx, 0x3d
mov ecx, 1
not rax
cmova rax, rcx
cmp edx, 0x71
setne cl
cmp edx, 0x29a
setne dl
test cl, dl
je 0x4aed49
test al, 1
jne 0x4aecf7
mov rax, qword [rbx + 0x10]
mov dword [rsi + 0x1c], 0
mov dword [rsi + 0xc], 0
mov qword [rsi + 0x20], 0
mov dword [rsi + 0x48], 2
mov dword [rbx + 0x28], 0
mov qword [rbx + 0x20], rax
mov eax, dword [rbx + 0x2c]
test eax, eax
js 0x4aee90
cmp eax, 2
je 0x4aee70
mov dword [rbx + 8], 0x2a
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.004b60c0
mov dword [rsi + 0x4c], eax
mov rcx, rbx
mov dword [rbx + 0x40], 0xfffffffe
call fcn.004b4af0
mov rbx, qword [rsi + 0x28]
xor edx, edx
mov eax, dword [rbx + 0x44]
mov rcx, qword [rbx + 0x68]
add eax, eax
mov dword [rbx + 0x58], eax
mov eax, dword [rbx + 0x74]
lea r8d, [rax - 1]
xor eax, eax
mov word [rcx + r8*2], ax
add r8, r8
call sub.msvcrt.dll_memset
movsxd rax, dword [rbx + 0xac]
mov dword [rbx + 0x94], 0
mov dword [rbx + 0x84], 0
mov dword [rbx + 0x9c], 0
mov dword [rbx + 0x1708], 0
mov dword [rbx + 0xa0], 2
mov dword [rbx + 0x88], 2
mov dword [rbx + 0x90], 0
shl rax, 4
mov dword [rbx + 0x70], 0
mov rdx, rax
lea rax, [0x00517180]
add rax, rdx
movzx edx, word [rax + 2]
mov dword [rbx + 0xa8], edx
movzx edx, word [rax]
mov dword [rbx + 0xb4], edx
movzx edx, word [rax + 4]
movzx eax, word [rax + 6]
mov dword [rbx + 0xb8], edx
mov dword [rbx + 0xa4], eax
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov dword [rbx + 8], 0x39
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.004b6c90
jmp 0x4aed9c
neg eax
mov dword [rbx + 0x2c], eax
jmp 0x4aed80
cmp qword [rsi + 0x38], 0
mov rax, qword [0x0051f580]
mov qword [rcx + 0x40], 0
mov qword [rcx + 0x30], rax
jne 0x4aeba2
nop
mov rdx, qword [0x0051f590]
mov qword [rsi + 0x38], rdx
jmp 0x4aeba2
mov eax, 0xfffffffa
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov rax, qword [0x0051f570]
mov dword [rbx + 8], 0x29a
mov rcx, rsi
mov rax, qword [rax + 0x30]
mov qword [rsi + 0x20], rax
call fcn.004ae5a0
mov eax, 0xfffffffc
jmp 0x4aecfc
mov eax, 0xfffffffc
jmp 0x4aecfc