Function at 0x505140
Capabilities:
Access peb ldr_data

Disassembly:
lea r12, [rsp - 0x18]
cmp r12, qword [r14 + 0x10]
jbe 0x5054f0
sub rsp, 0x98
mov qword [rsp + 0x90], rbp
lea rbp, [rsp + 0x90]
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xc8], r8
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0xb0], rcx
shl rsi, 1
mov rax, rsi
call fcn.00506220
mov qword [rsp + 0x80], rax
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x58], rcx
mov rdx, qword [rax]
mov qword [rsp + 0x88], rdx
mov rbx, qword [rax + 8]
mov qword [rsp + 0x50], rbx
mov rax, rdx
call fcn.005026e0
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
jbe 0x5054e8
mov rbx, qword [rsp + 0xb8]
mov rax, qword [rbx]
mul rax
mov rsi, qword [rsp + 0x78]
cmp rsi, 1
jbe 0x5054db
mov rdi, qword [rsp + 0xa0]
mov qword [rdi + 8], rdx
mov qword [rdi], rax
mov r8, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x58]
mov r9, qword [rsp + 0xc8]
mov eax, 1
jmp 0x50526b
mov r10, qword [rsp + 0x60]
mov r8, qword [rsp + 0x88]
mov qword [r8 + r10], rax
mov r10, qword [rsp + 0x68]
lea rax, [r10 + 1]
mov r10, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x58]
mov r9, qword [rsp + 0xc8]
mov rbx, qword [rsp + 0xb8]
mov rcx, r10
cmp rcx, rax
jle 0x50534e
mov r10, qword [rbx + rax*8]
mov r11, rax
mov rax, r10
mov r12, rdx
mul rax
lea r13, [r11 + r11]
lea r13, [r13 + 1]
cmp rsi, r13
jbe 0x5054d0
mov qword [rdi + r13*8], rdx
mov r13, r11
shl r11, 1
nop
cmp rsi, r11
jbe 0x5054c5
mov r15, r13
shl r13, 4
mov qword [rdi + r13], rax
cmp r12, r11
jb 0x5054b8
nop dword [rax]
cmp r15, r11
ja 0x5054ad
mov qword [rsp + 0x70], r11
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r13
mov rax, r15
shl r15, 3
sub r12, rax
mov rdx, r12
neg r12
sar r12, 0x3f
and r15, r12
lea rsi, [r8 + r15]
mov qword [rsp], rsi
sub r11, rax
mov qword [rsp + 8], r11
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x30], r10
call fcn.0050de60
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x70]
cmp rcx, rdx
ja 0x505224
jmp 0x5054a5
lea rbx, [rcx + rcx]
lea rbx, [rbx - 1]
cmp rdx, rbx
jb 0x50549a
nop
cmp rbx, 1
jb 0x50548d
mov qword [rsp + 0x70], rbx
lea rax, [rdx - 1]
mov rbx, rax
neg rax
sar rax, 0x3f
and rax, 8
add rax, r8
mov qword [rsp], rax
lea rcx, [rcx + rcx]
lea rcx, [rcx - 2]
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rax
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], 1
call fcn.0050dcc0
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x70]
nop word [rax + rax]
cmp rcx, rdx
jbe 0x505485
mov rbx, qword [rsp + 0x88]
mov qword [rbx + rdx*8], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp], rax
mov rdx, qword [rsp + 0x78]
mov qword [rsp + 8], rdx
mov rsi, qword [rsp + 0xb0]
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rax
mov qword [rsp + 0x20], rdx
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rcx
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x40], rax
nop dword [rax + rax]
call fcn.0050da40
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
nop
lea rax, [0x0085ec80]
lea rbx, [0x006648a0]
mov rcx, qword [rsp + 0x80]
call fcn.0046c780
mov rbp, qword [rsp + 0x90]
add rsp, 0x98
ret
mov rax, rdx
call fcn.004636e0
mov eax, 1
mov rcx, rbx
call fcn.004637a0
mov rcx, rbx
nop dword [rax]
call fcn.00463760
mov rax, rdx
call fcn.004636e0
mov rax, r15
mov rcx, r11
call fcn.004637a0
mov rcx, r11
mov rdx, r12
nop
call fcn.00463760
mov rax, r11
mov rcx, rsi
call fcn.004636e0
mov rax, r13
mov rcx, rsi
call fcn.004636e0
mov eax, 1
mov rcx, rsi
call fcn.004636e0
xor eax, eax
call fcn.004636e0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], r8
call fcn.00460fe0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
jmp fcn.00505140