Function at 0x505060
Capabilities:
Access peb ldr_data

Disassembly:
lea r12, [rsp - 0x20]
cmp r12, qword [r14 + 0x10]
jbe 0x50553c
sub rsp, 0xa0
mov qword [rsp + 0x98], rbp
lea rbp, [rsp + 0x98]
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xe8], rdi
mov qword [rsp + 0x100], r9
mov rbx, qword [rsp + 0xc8]
cmp rsi, rbx
jne 0x505528
cmp r10, rbx
jne 0x505528
mov r10, qword [rsp + 0xb0]
cmp r10, rbx
jne 0x505528
mov qword [rsp + 0xf0], rsi
mov qword [rsp + 0xf8], r8
mov qword [rsp + 0x100], r9
mov qword [rsp + 0xe8], rdi
mov r11, rbx
shl rbx, 1
cmp rcx, rbx
jl 0x505100
jae 0x505154
jmp 0x50551d
cmp rbx, 1
jne 0x505126
lea rax, [0x006475e0]
mov ebx, 1
mov rcx, rbx
call fcn.00449540
mov ecx, 1
mov ebx, 1
jmp 0x505154
mov qword [rsp + 0x80], rbx
lea rcx, [r11 + r11]
lea rcx, [rcx + 4]
mov qword [rsp + 0x58], rcx
lea rax, [0x006475e0]
call fcn.00449540
mov rcx, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x80]
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x88], rax
call fcn.00504220
mov rdx, qword [rsp + 0xf8]
mov rsi, qword [rsp + 0x100]
mov rdi, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xf0]
mov rax, qword [rsp + 0x88]
mov r9, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x58]
xor ebx, ebx
xor r10d, r10d
jmp 0x5051ee
mov r11, qword [rsp + 0x60]
lea rbx, [r11 + 1]
mov rdx, qword [rsp + 0xf8]
mov r11, qword [rsp + 0x100]
mov rdi, qword [rsp + 0xc8]
mov r12, qword [rsp + 0xf0]
mov r9, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x58]
mov rsi, r11
mov r8, r12
mov r10, rax
mov rax, qword [rsp + 0x88]
cmp rdi, rbx
jle 0x505380
mov r11, qword [rsi + rbx*8]
lea r12, [rbx + rdi]
nop
cmp rcx, r12
jb 0x505512
cmp rbx, r12
ja 0x505507
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x80], r12
mov qword [rsp + 0x70], r10
mov rsi, rbx
shl rbx, 3
sub rcx, rsi
mov qword [rsp + 0x78], rcx
mov r12, rcx
neg rcx
sar rcx, 0x3f
and rbx, rcx
lea rcx, [rax + rbx]
mov qword [rsp + 0x90], rcx
mov qword [rsp], rcx
mov qword [rsp + 8], rdi
mov qword [rsp + 0x10], r12
mov qword [rsp + 0x18], r9
mov qword [rsp + 0x20], r8
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x30], r11
call fcn.0050f9a0
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x50]
cmp rcx, rdx
jae 0x5054fc
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x88]
mov rdx, qword [rax + rcx*8]
mov rbx, qword [rsp + 0x90]
mov qword [rsp], rbx
mov rbx, qword [rsp + 0xc8]
mov qword [rsp + 8], rbx
mov rsi, qword [rsp + 0x78]
mov qword [rsp + 0x10], rsi
mov rsi, qword [rsp + 0xa8]
mov qword [rsp + 0x18], rsi
mov rdi, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rdi
mov r8, qword [rsp + 0xb8]
mov qword [rsp + 0x28], r8
mov r9, qword [rsp + 0xc0]
imul rdx, r9
mov qword [rsp + 0x30], rdx
call fcn.0050f9a0
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
add rdx, rcx
lea rbx, [rdx + rax]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x80]
cmp rsi, rdi
jbe 0x5054f1
mov r8, qword [rsp + 0x88]
mov qword [r8 + rdi*8], rbx
nop dword [rax]
cmp rcx, rdx
ja 0x50536a
cmp rax, rbx
jbe 0x505374
mov eax, 1
jmp 0x5051a7
xor eax, eax
jmp 0x5051a7
test r10, r10
je 0x505440
cmp rdi, rcx
ja 0x5054e6
mov rdx, qword [rsp + 0x50]
nop word [rax + rax]
cmp rdi, rdx
ja 0x5054db
mov qword [rsp], rax
mov qword [rsp + 8], rdi
mov qword [rsp + 0x10], rcx
sub rcx, rdi
mov rsi, rcx
neg rcx
mov r8, rdi
shl rdi, 3
sar rcx, 0x3f
and rcx, rdi
add rcx, rax
mov qword [rsp + 0x18], rcx
sub rdx, r8
mov qword [rsp + 0x20], rdx
mov qword [rsp + 0x28], rsi
mov rcx, qword [rsp + 0xa8]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rsp + 0xb0]
mov qword [rsp + 0x38], rcx
mov rcx, qword [rsp + 0xb8]
mov qword [rsp + 0x40], rcx
call fcn.0050f620
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x58]
mov r8, qword [rsp + 0xc8]
jmp 0x5054a1
cmp rdi, rcx
ja 0x5054d0
mov rsi, qword [rsp + 0x50]
cmp rdi, rsi
ja 0x5054c5
sub rsi, rdi
cmp rdi, rsi
mov rbx, rdi
cmovg rdi, rsi
mov rsi, rbx
sub rbx, rcx
mov r8, rsi
shl rsi, 3
sar rbx, 0x3f
and rbx, rsi
lea rsi, [rax + rbx]
test rbx, rbx
je 0x5054a1
shl rdi, 3
mov rbx, rsi
mov rcx, rdi
call fcn.00463e40
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x58]
mov r8, qword [rsp + 0xc8]
cmp r8, rcx
ja 0x5054b9
mov rbx, r8
mov rbp, qword [rsp + 0x98]
add rsp, 0xa0
ret
mov rdx, rcx
mov rcx, r8
nop
call fcn.00463560
mov rax, rdi
mov rcx, rsi
call fcn.004635a0
mov rdx, rcx
mov rcx, rdi
call fcn.00463560
mov rax, rdi
mov rcx, rdx
call fcn.004635a0
mov rdx, rcx
mov rcx, rdi
call fcn.00463560
mov rax, rdi
mov rcx, rsi
call fcn.004634e0
mov rax, rcx
mov rcx, rdx
call fcn.004634e0
mov rax, rbx
mov rcx, r12
call fcn.004635a0
mov rdx, rcx
mov rcx, r12
call fcn.00463560
mov rdx, rcx
mov rcx, rbx
call fcn.00463560
lea rax, [0x00647c20]
lea rbx, [0x006f3b10]
call fcn.00435980
nop
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x68], r10
mov qword [rsp + 0x70], r11
call fcn.00460de0
mov rax, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov r9, qword [rsp + 0x60]
mov r10, qword [rsp + 0x68]
mov r11, qword [rsp + 0x70]
nop dword [rax + rax]
jmp fcn.00505060