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

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2c8]
sub rsp, 0x3c8
lea r15, [rdx + 0x528]
xor edi, edi
movsxd r14, dword [r15 + 0x3c]
mov rsi, rcx
add r14, r15
mov qword [rsp + 0x60], rdi
xor ecx, ecx
mov qword [rbp - 0x78], r14
mov r13, rdx
mov qword [rbp + 0x328], rdi
mov qword [rsp + 0x50], rdi
mov qword [rbp - 0x80], r15
call qword [rsi + 0x40]
mov rcx, rax
movsxd rax, dword [rax + 0x3c]
movzx ecx, word [rax + rcx + 4]
cmp word [r14 + 4], cx
jne 0x50521f
mov eax, dword [r14 + 0x50]
mov qword [rbp - 0x68], rax
mov eax, dword [r14 + 0xb4]
mov dword [rbp + 0x320], eax
test eax, eax
jne 0x504934
mov rax, qword [r14 + 0x30]
mov qword [rbp + 0x328], rax
mov ecx, 3
mov qword [rsp + 0x30], rdi
lea rbx, [rsi + 0x625]
lea eax, [rcx - 2]
lea r12d, [rcx - 1]
cmp byte [rbx], dil
jne 0x504985
mov dword [rsp + 0x28], 0x8000000
lea r9, [rbp - 0x68]
xor r8d, r8d
mov dword [rsp + 0x20], 0x40
mov edx, 0xf001f
lea rcx, [rsp + 0x68]
call qword [rsi + 0x210]
test eax, eax
jne 0x50521f
jmp 0x504a20
mov dword [rsp + 0x28], edi
xor r9d, r9d
mov dword [rsp + 0x20], ecx
mov r8d, eax
mov rcx, rbx
mov edx, 0x80000000
call qword [rsi + 0x90]
mov rdi, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x50521f
xor ebx, ebx
lea rdx, [rsp + 0x58]
mov rcx, rdi
mov qword [rsp + 0x58], rbx
call qword [rsi + 0x98]
test eax, eax
je 0x50521f
mov eax, dword [rsp + 0x58]
cmp dword [r14 + 0x50], eax
ja 0x50521f
mov qword [rsp + 0x30], rdi
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x28], 0x1000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], r12d
mov edx, 0xf001f
call qword [rsi + 0x210]
mov rcx, rdi
mov ebx, eax
call qword [rsi + 0xf0]
xor edi, edi
test ebx, ebx
jne 0x50521f
lea rbx, [rsi + 0x625]
call qword [rsi + 0xb0]
mov rcx, qword [rsp + 0x68]
lea r8, [rbp + 0x328]
mov dword [rsp + 0x48], 4
mov rdx, rax
mov dword [rsp + 0x40], edi
lea rax, [rsp + 0x50]
mov dword [rsp + 0x38], r12d
xor r9d, r9d
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [rsi + 0x218]
mov rcx, qword [rbp + 0x328]
movsxd r12, dword [r15 + 0x3c]
add r12, rcx
mov qword [rsp + 0x78], r12
test eax, eax
je 0x504a85
cmp eax, 0x40000003
jne 0x50521f
test rcx, rcx
je 0x50521f
cmp byte [rbx], dil
je 0x504af8
mov rdx, qword [rsp + 0x50]
lea r9, [rbp + 0x310]
mov edi, 4
mov r8d, edi
call qword [rsi + 0x60]
lea rbx, [r14 + 0x54]
mov r9d, edi
mov edx, dword [rbx]
xor ecx, ecx
mov r8d, 0x3000
mov qword [rsp + 0x70], rbx
call qword [rsi + 0x48]
mov r8d, dword [rbx]
mov rcx, rax
mov rdx, qword [rbp + 0x328]
mov qword [rsp + 0x58], rax
call fcn.005060c1
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, qword [rbp + 0x328]
call fcn.005060e1
mov rcx, qword [rbp + 0x328]
xor edi, edi
jmp 0x504b0d
mov rax, qword [rbp + 0x318]
lea rbx, [r14 + 0x54]
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x58], rax
mov r8d, dword [rbx]
mov rdx, r15
call fcn.005060c1
mov rax, qword [rbp + 0x328]
mov r15d, edi
mov qword [r12 + 0x30], rax
movzx eax, word [r12 + 0x14]
add rax, 0x18
add rax, r12
mov qword [rbp - 0x70], rax
cmp di, word [r12 + 6]
jae 0x504b92
mov r14, qword [rbp - 0x80]
mov r13, rax
mov eax, r15d
lea rdi, [rax + rax*4]
mov ebx, dword [r13 + rdi*8 + 0xc]
add rbx, qword [rbp + 0x328]
mov edx, dword [r13 + rdi*8 + 0x14]
mov rcx, rbx
mov r8d, dword [r13 + rdi*8 + 0x10]
add rdx, r14
call fcn.005060c1
movzx eax, byte [rbx]
inc r15d
mov dword [r13 + rdi*8 + 8], eax
movzx eax, word [r12 + 6]
cmp r15d, eax
jb 0x504b47
mov r14, qword [rbp - 0x78]
xor edi, edi
mov r13, qword [rbp + 0x318]
mov r8, qword [rbp + 0x328]
mov eax, dword [rbp + 0x320]
mov r10, r8
sub r10, qword [r14 + 0x30]
test eax, eax
je 0x504ca0
test r10, r10
je 0x504ca0
mov ecx, dword [r12 + 0xb0]
lea rbx, [rcx + rax]
lea rax, [rbx + r8]
lea r9, [rcx + r8]
cmp r9, rax
jae 0x504ca0
mov r15d, 0xfff
cmp dword [r9 + 4], edi
je 0x504ca0
mov eax, dword [r9 + 4]
lea r11, [r9 + 8]
add rax, r9
cmp r11, rax
je 0x504c90
mov ecx, 2
movzx edx, word [r11]
mov eax, edx
and eax, r15d
add eax, dword [r9]
cmp eax, dword [r12 + 0x50]
jae 0x504c7d
mov ecx, dword [r9]
mov eax, edx
and rax, r15
shr dx, 0xc
add rax, r8
add rcx, rax
cmp dx, 0xa
jne 0x504c2d
add qword [rcx], r10
jmp 0x504c63
mov eax, 3
cmp dx, ax
jne 0x504c3c
mov eax, r10d
jmp 0x504c60
mov eax, 1
cmp dx, ax
jne 0x504c52
mov rax, r10
shr rax, 0x10
movzx eax, ax
jmp 0x504c60
mov eax, 2
cmp dx, ax
jne 0x504c71
movzx eax, r10w
add qword [rcx], rax
mov r8, qword [rbp + 0x328]
mov ecx, 2
jmp 0x504c7d
test dx, dx
jne 0x5051b2
mov rcx, rax
mov eax, dword [r9 + 4]
add r11, rcx
add rax, r9
cmp r11, rax
jne 0x504bfd
lea rax, [rbx + r8]
mov r9, r11
cmp r11, rax
jb 0x504bda
mov eax, dword [r12 + 0x90]
test eax, eax
je 0x504d66
lea rbx, [r8 + rax]
cmp dword [rbx + 0xc], edi
je 0x504d66
mov r14, qword [rbp + 0x318]
mov edx, dword [rbx + 0xc]
mov rcx, rsi
add rdx, r8
call fcn.005058b1
mov r8, qword [rbp + 0x328]
mov r13, rax
mov edi, dword [rbx]
mov r15d, dword [rbx + 0x10]
add rdi, r8
add r15, r8
mov rcx, qword [rdi]
xor eax, eax
test rcx, rcx
je 0x504d47
jns 0x504cfc
mov r9d, ecx
xor r8d, r8d
jmp 0x504d28
lea r12, [rcx + r8]
cmp dword [r14 + 4], eax
je 0x504d20
lea rdx, [r12 + 2]
mov rcx, rsi
call fcn.00503d45
test eax, eax
je 0x504d20
mov rax, qword [rsi + 0x1e0]
jmp 0x504d33
xor r9d, r9d
lea r8, [r12 + 2]
mov rdx, r13
mov rcx, rsi
call fcn.00505999
mov qword [r15], rax
add rdi, 8
mov r8, qword [rbp + 0x328]
add r15, 8
jmp 0x504ce8
add rbx, 0x14
xor edi, edi
cmp dword [rbx + 0xc], edi
jne 0x504cc4
mov r14, qword [rbp - 0x78]
mov r13, qword [rbp + 0x318]
mov r12, qword [rsp + 0x78]
mov eax, dword [r12 + 0xf0]
test eax, eax
je 0x504dfc
lea rdi, [rax + 4]
add rdi, r8
mov eax, dword [rdi]
test eax, eax
je 0x504dfa
mov edx, eax
mov rcx, rsi
add rdx, r8
call fcn.005058b1
mov r8, qword [rbp + 0x328]
mov r12, rax
xor eax, eax
test r12, r12
je 0x504deb
mov ebx, dword [rdi + 0xc]
mov r15d, dword [rdi + 8]
add rbx, r8
add r15, r8
jmp 0x504de3
jns 0x504dba
mov r9d, dword [rbx]
mov r8, rax
jmp 0x504dc4
add r8, 2
mov r9d, eax
add r8, rcx
mov rdx, r12
mov rcx, rsi
call fcn.00505999
mov qword [r15], rax
add rbx, 8
mov r8, qword [rbp + 0x328]
add r15, 8
xor eax, eax
mov rcx, qword [rbx]
test rcx, rcx
jne 0x504db0
add rdi, 0x20
mov eax, dword [rdi]
test eax, eax
jne 0x504d83
mov r12, qword [rsp + 0x78]
xor edi, edi
mov r12d, dword [r12 + 0x28]
lea rcx, [rbp - 0x60]
mov eax, 2
add r12, r8
mov qword [rbp - 0x80], r12
lea edx, [rax + 0x7e]
movups xmm0, xmmword [r14]
movups xmm1, xmmword [r14 + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [r14 + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [r14 + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [r14 + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [r14 + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [r14 + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [r14 + 0x70]
add r14, rdx
movups xmmword [rcx + 0x60], xmm0
add rcx, rdx
movups xmmword [rcx - 0x10], xmm1
sub rax, 1
jne 0x504e14
mov rax, qword [r14]
mov r8d, 0x3000
mov qword [rcx], rax
xor ecx, ecx
mov rax, qword [rbp - 0x60]
shr rax, 0x30
lea r9d, [rcx + 4]
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [rsi + 0x48]
movzx r15d, word [rbp - 0x5a]
mov rcx, rax
mov rdx, qword [rbp - 0x70]
mov rbx, rax
mov qword [rsp + 0x60], rax
lea r8d, [r15 + r15*4]
shl r8d, 3
call fcn.005060c1
mov eax, 1
cmp dword [rsi + 0x574], eax
jne 0x504f11
cmp byte [rsi + 0x625], dil
jne 0x504eeb
mov rbx, qword [rsp + 0x70]
xor edx, edx
mov rcx, qword [rbp + 0x328]
mov r8d, dword [rbx]
call fcn.005060e1
mov r8d, dword [rbx]
lea rcx, [r13 + 0x528]
xor edx, edx
call fcn.005060e1
jmp 0x504f0c
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x504f11
mov rbx, qword [rsp + 0x70]
mov rdx, rax
mov rcx, qword [rbp + 0x328]
mov r8d, dword [rbx]
call fcn.005060c1
mov rbx, qword [rsp + 0x60]
cmp byte [rsi + 0x625], dil
jne 0x504fa8
call qword [rsi + 0xb0]
mov rdx, qword [rbp + 0x328]
mov rcx, rax
call qword [rsi + 0x220]
test eax, eax
jne 0x50521f
mov rax, qword [rbp + 0x328]
cmp dword [rbp + 0x320], edi
mov qword [rsp + 0x50], rdi
cmovne rax, rdi
mov qword [rbp + 0x328], rax
call qword [rsi + 0xb0]
mov rcx, qword [rsp + 0x68]
lea r8, [rbp + 0x328]
mov dword [rsp + 0x48], pe_nt_image_headers64
mov rdx, rax
mov dword [rsp + 0x40], edi
mov eax, 2
mov dword [rsp + 0x38], eax
xor r9d, r9d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [rsi + 0x218]
test eax, eax
jne 0x50521f
mov rdx, qword [rsp + 0x50]
lea r9, [rbp + 0x310]
mov rcx, qword [rbp + 0x328]
mov r8d, 8
call qword [rsi + 0x60]
mov r14d, edi
test r15d, r15d
je 0x5050bb
mov r13, qword [rsp + 0x60]
lea rdi, [rbx + 0xc]
mov ebx, dword [rbp + 0x318]
xor r12d, r12d
lea r10d, [r12 + 1]
mov edx, dword [rdi + 0x18]
mov r8d, edx
mov ecx, edx
shr r8d, 0x1e
shr edx, 0x1d
and edx, r10d
shr ecx, 0x1f
test ecx, edx
jne 0x50509e
test r8d, edx
je 0x505010
mov ebx, 0x20
jmp 0x505056
mov r9d, edx
mov eax, ecx
xor r9d, r10d
and eax, r8d
test r9d, eax
je 0x505032
mov al, byte [rsi + 0x625]
neg al
sbb ebx, ebx
and ebx, 0xfffffffc
add ebx, 8
jmp 0x505056
xor ecx, r10d
mov eax, r8d
xor eax, r10d
and eax, ecx
test edx, eax
je 0x505048
mov ebx, 0x10
jmp 0x505056
and ecx, r8d
mov eax, 2
test r9d, ecx
cmovne ebx, eax
mov r8d, dword [rdi]
lea eax, [r15 - 1]
mov r10, qword [rbp + 0x328]
add r10, r8
cmp r14d, eax
jae 0x50507e
lea eax, [r14 + 1]
lea rax, [rax + rax*4]
mov edx, dword [r13 + rax*8 + 0xc]
sub rdx, r8
jmp 0x505081
mov edx, dword [rdi + 4]
lea r9, [rbp + 0x310]
mov dword [rbp + 0x310], r12d
mov r8d, ebx
mov rcx, r10
call qword [rsi + 0x60]
mov r10d, 1
add r14d, r10d
add rdi, 0x28
cmp r14d, r15d
jb 0x504fe7
mov r12, qword [rbp - 0x80]
xor edi, edi
mov r13, qword [rbp + 0x318]
mov edx, dword [rbp - 0x34]
lea r9, [rbp + 0x310]
mov rcx, qword [rbp + 0x328]
mov r8d, 2
mov dword [rbp + 0x310], edi
call qword [rsi + 0x60]
mov rcx, qword [rsp + 0x78]
mov r14d, 1
mov eax, dword [rcx + 0xd0]
mov rcx, qword [rbp + 0x328]
test eax, eax
je 0x50511e
mov rbx, qword [rax + rcx + 0x18]
test rbx, rbx
je 0x50511e
jmp 0x505116
xor r8d, r8d
mov edx, r14d
call rax
mov rcx, qword [rbp + 0x328]
lea rbx, [rbx + 8]
mov rax, qword [rbx]
test rax, rax
jne 0x505103
mov eax, 3
cmp dword [r13], eax
jne 0x50529f
mov eax, dword [rbp - 0x38]
xor r8d, r8d
add rax, rcx
mov edx, r14d
call rax
cmp byte [r13 + 0x30c], dil
je 0x505312
mov eax, dword [rbp + 0x28]
mov r8, qword [rbp + 0x328]
lea rcx, [r8 + rax]
test eax, eax
je 0x50532d
mov ebx, dword [rcx + 0x18]
test ebx, ebx
je 0x50532d
mov edi, dword [rcx + 0x1c]
mov r15d, dword [rcx + 0x20]
add rdi, r8
mov r14d, dword [rcx + 0x24]
add r15, r8
add r14, r8
lea eax, [rbx - 1]
mov ecx, dword [r15 + rax*4]
lea rdx, [r13 + 0x30c]
add rcx, r8
mov r12d, eax
mov ebx, eax
call fcn.005060fd
mov r8, qword [rbp + 0x328]
test eax, eax
je 0x505233
test ebx, ebx
jne 0x50517d
mov r13, qword [rbp + 0x318]
test r8, r8
je 0x50520a
movzx eax, word [rbp - 0x5a]
mov edi, 0xc000
mov rcx, qword [rsp + 0x60]
mov r8d, edi
lea rdx, [rax + rax*4]
shl rdx, 3
call qword [rsi + 0x50]
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x5051e9
mov edx, dword [rbp - 0xc]
mov r8d, edi
mov rcx, rax
call qword [rsi + 0x50]
call qword [rsi + 0xb0]
mov rdx, qword [rbp + 0x328]
mov rcx, rax
call qword [rsi + 0x220]
mov rcx, qword [rsp + 0x68]
call qword [rsi + 0xf0]
mov r8d, dword [r13 + 0x524]
lea rcx, [r13 + 0x528]
xor edx, edx
call fcn.005060e1
add rsp, 0x3c8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx eax, word [r14 + r12*2]
mov ebx, dword [rdi + rax*4]
add rbx, r8
je 0x5051ab
mov r13, qword [rbp + 0x318]
xor r14d, r14d
lea rdi, [r13 + 0x40c]
cmp byte [rdi], r14b
je 0x50529b
cmp dword [r13 + 0x50c], r14d
je 0x505285
lea rax, [rbp + 0xb0]
mov dword [rsp + 0x28], 0x100
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
mov r8, rdi
xor edx, edx
xor ecx, ecx
call qword [rsi + 0x70]
cmp dword [r13 + 0x50c], r14d
lea rcx, [rbp + 0xb0]
cmove rcx, rdi
call rbx
jmp 0x505309
call rbx
jmp 0x505309
lea r8, [r13 + 0x40c]
cmp byte [r8], dil
je 0x5052d9
lea rax, [rbp + 0xb0]
mov dword [rsp + 0x28], 0x100
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
xor edx, edx
xor ecx, ecx
call qword [rsi + 0x70]
lea rdx, [rbp + 0xb0]
mov rcx, rsi
call fcn.00505655
cmp dword [r13 + 4], edi
je 0x50531b
mov qword [rsp + 0x28], rdi
xor r9d, r9d
mov r8, r12
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [rsi + 0x88]
test rax, rax
je 0x505309
or edx, 0xffffffff
mov rcx, rax
call qword [rsi + pe_nt_image_headers64]
mov r8, qword [rbp + 0x328]
jmp 0x505334
mov r13, qword [rbp + 0x318]
jmp 0x505309
mov rcx, qword gs:[0x30]
mov rcx, qword [rcx + 0x60]
call r12
jmp 0x505309
mov r13, qword [rbp + 0x318]
mov eax, 3
cmp dword [rsi + 0x230], eax
jne 0x5051b2
or ecx, 0xffffffff
call qword [rsi + 0x68]
mov r8, qword [rbp + 0x328]
jmp 0x5051b2