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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
mov r13d, 0xffffffff
mov rax, qword [rcx]
mov rsi, qword [rcx + 0x10]
mov qword [rsp + 0x1b8], rdx
mov rdx, qword [rax + 8]
mov r15, rcx
mov qword [rsp + 0x68], rax
movzx eax, byte [rsi + 0x10]
mov word [rsp + 0x72], r13w
lea rcx, [rax + rax*2]
lea rax, [rax + rcx*4]
lea r14, [rdx + rax*8 + 8]
mov rax, qword [r14 + 0x20]
movzx edx, byte [r14 + 0x40]
mov qword [rsp + 0x50], rax
mov rax, qword [r15 + 8]
mov qword [rsp + 0x48], rax
test dl, 2
je 0x851da0
mov rdi, qword [r14 + 0x60]
test rdi, rdi
setne r13b
xor ebx, ebx
cmp qword [r15 + 0x18], 0
je 0x851dc7
test r13b, r13b
je 0x8517bb
mov r9, qword [rdi + 0x48]
mov dword [rsp + 0x44], 1
nop dword [rax + rax]
test r9, r9
je 0x851520
movzx edx, byte [r14 + 0x3c]
mov ecx, dword [r14 + 0x44]
mov r8, qword [rsp + 0x48]
call fcn.00859860
test eax, eax
je 0x8519e0
movzx eax, byte [rdi + 0x65]
and eax, 1
mov byte [rsp + 0x38], al
jne 0x8519e0
mov rax, qword [rdi + 0x10]
mov rcx, qword [rsp + 0x1b8]
xor r8d, r8d
xor r9d, r9d
movzx eax, word [rax]
mov dword [rsi + 0x3c], 0
mov byte [rsi + 0x11], 0
mov word [rsp + 0x42], ax
mov word [rsi + 0x16], ax
movzx eax, byte [rdi + 0x64]
mov dword [rsi + 0x18], 0
mov word [rsi + 0x1c], r8w
mov word [rsi + 0x12], r9w
mov qword [rsi], rcx
mov qword [rsi + 0x20], rdi
test al, 4
jne 0x851a40
mov rdx, qword [r15]
mov r13, qword [rdx + 0x10]
test r13, r13
je 0x851a40
mov edx, dword [r13]
test edx, edx
jle 0x851605
mov r9d, dword [r14 + 0x44]
mov qword [rsp + 0x60], r14
xor r12d, r12d
mov qword [rsp + 0x58], rsi
mov esi, r9d
nop word [rax + rax]
mov rax, r12
shl rax, 5
mov rbx, qword [r13 + rax + 8]
test rbx, rbx
je 0x8515ee
nop dword [rax]
mov eax, dword [rbx + 4]
test eax, 0x82000
je 0x8517f3
test eax, 0x80000
je 0x8517d8
mov rax, qword [rbx + 0x20]
mov rbx, qword [rax + 8]
test rbx, rbx
jne 0x8515c8
add r12, 1
cmp edx, r12d
jg 0x8515b0
mov rsi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x60]
movzx eax, byte [rdi + 0x64]
mov edx, eax
xor ebx, ebx
and edx, 3
cmp dl, 3
je 0x852078
nop dword [rax]
test al, 0x20
je 0x851aa0
mov qword [rsp + 0x78], 0
xor ecx, ecx
mov dword [rsi + 0x38], 0x240
test ebx, ebx
jne 0x851a88
mov rax, qword [rsp + 0x50]
test byte [rax + 0x30], 0x80
jne 0x851650
cmp qword [rdi + 0x48], 0
je 0x851ff0
movzx eax, byte [rsp + 0x38]
mov rbx, qword [rsp + 0x50]
mov byte [rsi + 0x11], al
movsx edx, word [rdi + 0x5c]
movsx r8d, word [rbx + 0x3c]
movzx ebx, word [rsp + 0x42]
mov eax, edx
shl eax, 4
sub eax, edx
cdq
idiv r8d
lea eax, [rbx + rax + 1]
mov word [rsi + 0x14], ax
test rcx, rcx
jne 0x851b28
movsx r8d, word [rsp + 0x42]
mov rcx, qword [rsp + 0x48]
mov rdx, rsi
mov ebx, r8d
call fcn.00856810
test byte [r14 + 0x3c], 0x10
je 0x851a60
cmp qword [rdi + 0x50], 0
je 0x851a60
mov word [rsi + 0x16], bx
mov byte [r15 + 0x2c], 0
xor r9d, r9d
mov r8, rdi
mov rdx, r14
mov rcx, r15
call fcn.008521a0
cmp byte [r15 + 0x2c], 1
mov ebx, eax
jne 0x8516e2
mov rax, qword [rsp + 0x50]
or dword [rax + 0x30], 0x100
mov rbp, qword [r15 + 0x20]
test rbp, rbp
je 0x8517a0
mov rdx, qword [rbp]
mov r13, qword [rbp + 8]
movzx eax, word [rdx + 8]
mov r12, qword [r13 + 0x18]
test ax, ax
je 0x851755
lea edx, [rax - 1]
mov dword [rsp + 0x38], ebx
mov rbx, r13
lea rax, [rdx*8]
sub rax, rdx
lea rax, [r13 + rax*8 + 0x38]
mov r13, rax
nop dword [rax]
test word [rbx + 0x14], 0x9000
jne 0x851737
mov eax, dword [rbx + 0x20]
test eax, eax
je 0x85173f
mov rcx, rbx
call fcn.00848830
add rbx, 0x38
cmp rbx, r13
jne 0x851728
mov rdx, qword [rbp]
mov ebx, dword [rsp + 0x38]
test rdx, rdx
je 0x85175e
sub dword [rdx], 1
je 0x851ca8
test r12, r12
je 0x851798
cmp qword [r12 + 0x1f0], rbp
jbe 0x851789
cmp qword [r12 + 0x1e0], rbp
jbe 0x851d40
cmp qword [r12 + 0x1e8], rbp
jbe 0x851fc0
cmp qword [r12 + 0x308], 0
jne 0x851cf0
mov rcx, rbp
call fcn.0082d7e0
mov dword [r15 + 0x28], 0
mov qword [r15 + 0x20], 0
test byte [r14 + 0x40], 2
je 0x8519b8
mov eax, ebx
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, qword [rbx + 0x10]
test rbx, rbx
je 0x8515ee
mov eax, dword [rbx + 4]
test eax, 0x82000
jne 0x8515d6
cmp byte [rbx], 0xa7
je 0x8519f0
mov r14, qword [rdi + 0x50]
test r14, r14
je 0x8515ee
movzx eax, word [rdi + 0x5e]
test ax, ax
je 0x8515ee
xor ebp, ebp
jmp 0x85182f
add rbp, 1
movzx edx, ax
cmp edx, ebp
jle 0x85198a
mov rdx, qword [rdi + 8]
cmp word [rdx + rbp*2], 0xfffe
jne 0x851820
mov rdx, rbp
shl rdx, 5
mov r8, qword [r14 + rdx + 8]
test r8, r8
je 0x851875
nop dword [rax + rax]
mov edx, dword [r8 + 4]
test edx, 0x82000
je 0x851875
and edx, 0x80000
je 0x8519a0
mov rdx, qword [r8 + 0x20]
mov r8, qword [rdx + 8]
test r8, r8
jne 0x851850
mov rdx, rbx
mov ecx, dword [rdx + 4]
test ecx, 0x82000
je 0x85195c
and ecx, 0x80000
je 0x851940
mov rdx, qword [rdx + 0x20]
mov rdx, qword [rdx + 8]
test rdx, rdx
jne 0x851878
test r8, r8
jne 0x851820
movzx eax, byte [rdi + 0x64]
mov rsi, qword [rsp + 0x58]
mov ebx, 1
mov r14, qword [rsp + 0x60]
mov edx, eax
and edx, 3
cmp dl, 3
jne 0x851618
movzx eax, byte [rsp + 0x44]
mov dword [rsi + 0x38], 0x100
mov byte [rsp + 0x38], al
movzx eax, byte [rsp + 0x38]
movsx r8d, word [rsp + 0x42]
mov rdx, rsi
mov byte [rsi + 0x11], al
mov rax, qword [rsp + 0x50]
mov ecx, r8d
mov ebp, r8d
mov eax, dword [rax + 0x30]
mov dword [rsp + 0x38], eax
shr eax, 0xc
and eax, 2
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
add eax, 0x10
mov word [rsi + 0x14], ax
call fcn.00856810
mov rdx, rsi
mov rcx, r15
call fcn.00856280
mov word [rsi + 0x16], bp
mov ebx, eax
test eax, eax
je 0x8516b7
jmp 0x8517bb
mov rdx, qword [rdx + 0x10]
test rdx, rdx
je 0x8518a0
mov ecx, dword [rdx + 4]
test ecx, 0x82000
jne 0x851887
test r8, r8
je 0x851820
xor ecx, ecx
mov r9d, esi
call fcn.007b80f0
test eax, eax
je 0x8518a9
movzx eax, word [rdi + 0x5e]
add rbp, 1
movzx edx, ax
cmp edx, ebp
jg 0x85182f
mov edx, dword [r13]
add r12, 1
cmp edx, r12d
jg 0x8515b0
jmp 0x8515f7
mov r8, qword [r8 + 0x10]
test r8, r8
jne 0x851850
jmp 0x851875
add dword [rsp + 0x44], 1
mov rdi, qword [rdi + 0x28]
test ebx, ebx
jne 0x8517bb
test rdi, rdi
je 0x8517bb
mov r9, qword [rdi + 0x48]
jmp 0x851500
xor ebx, ebx
jmp 0x8517b0
cmp esi, dword [rbx + 0x2c]
jne 0x8517fc
movzx ecx, word [rbx + 0x30]
test cx, cx
js 0x8518a9
movzx r8d, word [rdi + 0x5e]
test r8w, r8w
je 0x8515ee
mov rax, qword [rdi + 8]
sub r8d, 1
lea r8, [rax + r8*2 + 2]
jmp 0x851a35
add rax, 2
cmp r8, rax
je 0x8515ee
cmp cx, word [rax]
jne 0x851a28
jmp 0x8518a9
mov edx, eax
xor ebx, ebx
and edx, 3
cmp dl, 3
jne 0x851618
mov dword [rsi + 0x38], 0x100
jmp 0x8518da
mov rdx, rsi
mov rcx, r15
call fcn.00856280
mov ebx, eax
movzx eax, word [rsp + 0x42]
mov word [rsi + 0x16], ax
test ebx, ebx
je 0x8516b7
jmp 0x8517bb
movzx eax, byte [rsp + 0x44]
mov byte [rsp + 0x38], al
jmp 0x851650
mov r8, qword [rdi + 0x48]
mov rcx, qword [r14 + 0x50]
and rcx, qword [rdi + 0x98]
mov qword [rsp + 0x78], rcx
test r8, r8
je 0x851ae4
mov rax, qword [rsp + 0x68]
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov rdx, rdi
mov qword [rsp + 0x28], 0
mov rcx, qword [rax]
call fcn.008570d0
mov rcx, qword [rsp + 0x78]
movabs rax, 0x8000000000000000
mov dword [rsi + 0x38], 0x200
cmp rcx, rax
je 0x851d00
movzx eax, byte [rdi + 0x65]
and eax, 0xc
cmp al, 8
jne 0x851d30
test rcx, rcx
jne 0x851d00
mov dword [rsi + 0x38], 0x240
jmp 0x851632
mov rdx, qword [rsp + 0x68]
mov ecx, ebx
mov r9d, dword [r14 + 0x44]
lea ebx, [rcx + 0x10]
mov ecx, dword [rdx + 0x84]
test ecx, ecx
jle 0x851c61
xor r8d, r8d
lea rcx, [rsp + 0x90]
xor r12d, r12d
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], r14
mov esi, r8d
mov r14d, r9d
mov rbp, rcx
mov qword [rsp + 0x1b0], r15
lea r10, [rsp + 0x80]
mov r15, rdi
mov rdi, rdx
jmp 0x851ba1
lea eax, [rbx - 1]
sub ebx, 0x14
test byte [r13 + 0x14], 0x82
cmove ebx, eax
add esi, 1
add r12, 0x38
cmp dword [rdi + 0x84], esi
jle 0x851c48
mov r13, qword [rdi + 0x90]
lea rax, [0x006f51e0]
add r13, r12
mov rdx, qword [r13]
mov qword [rbp + 8], 0
mov qword [rbp], 0
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 0
mov qword [rbp + 0x20], 0
mov dword [rsp + 0x88], r14d
mov qword [rsp + 0x80], r15
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xb8], r10
test rdx, rdx
je 0x851c20
mov rcx, rbp
mov qword [rsp + 0x38], r10
call fcn.008173a0
mov r10, qword [rsp + 0x38]
cmp word [rsp + 0xb4], 0
jne 0x851c48
movzx eax, word [r13 + 0x10]
test ax, ax
jg 0x851b80
add ebx, eax
add esi, 1
add r12, 0x38
cmp dword [rdi + 0x84], esi
jg 0x851ba1
nop dword [rax + rax]
mov rsi, qword [rsp + 0x58]
mov rdi, r15
mov r14, qword [rsp + 0x60]
mov r15, qword [rsp + 0x1b0]
movzx eax, word [rsi + 0x14]
movsx edx, bx
movsx ecx, ax
cmp bx, ax
jg 0x851d60
lea r8d, [rdx + 0x31]
cmp ecx, r8d
jg 0x851c98
lea r8d, [rdx + 0x1f]
cmp ecx, r8d
jg 0x851fe0
sub ecx, edx
movsxd rdx, ecx
lea rcx, str._n_n_t_t_b_b_a_a_a
movzx edx, byte [rcx + rdx]
add eax, edx
mov word [rsi + 0x14], ax
jmp 0x851687
mov rcx, qword [rdx + 0x10]
cmp qword [rcx + 0x1f0], rdx
jbe 0x851ccf
cmp qword [rcx + 0x1e0], rdx
jbe 0x851fa8
cmp qword [rcx + 0x1e8], rdx
jbe 0x852160
cmp qword [rcx + 0x308], 0
je 0x851f98
call fcn.007595e0
jmp 0x85175e
mov rdx, rbp
mov rcx, r12
call fcn.007595e0
jmp 0x8517a0
mov rax, qword [rsp + 0x68]
mov r8d, dword [r14 + 0x44]
mov rdx, rdi
mov rcx, qword [rax + 0x20]
call fcn.00850b40
test eax, eax
jne 0x851f80
mov rcx, qword [rsp + 0x78]
jmp 0x851632
test rcx, rcx
jne 0x851632
jmp 0x851b16
mov rax, qword [r12 + 0x1d8]
mov qword [rbp], rax
mov qword [r12 + 0x1d8], rbp
jmp 0x8517a0
lea r8d, [rcx + 0x31]
mov eax, ebx
cmp edx, r8d
jg 0x851c98
lea r8d, [rcx + 0x1f]
cmp edx, r8d
jg 0x851fe0
sub edx, ecx
lea rcx, str._n_n_t_t_b_b_a_a_a
movsxd rdx, edx
movzx edx, byte [rcx + rdx]
add eax, edx
mov word [rsi + 0x14], ax
jmp 0x851687
mov rax, qword [rsp + 0x50]
test byte [rax + 0x30], 0x80
je 0x852089
mov rdi, qword [rax + 0x10]
test rdi, rdi
setne r13b
xor ebx, ebx
cmp qword [r15 + 0x18], 0
jne 0x8514e3
mov rax, qword [rsp + 0x50]
movzx ebp, word [rax + 0x3a]
mov rax, qword [rsp + 0x68]
test word [rax + 0x3c], 0x1020
jne 0x8514e3
mov rcx, qword [rax]
mov rcx, qword [rcx]
test byte [rcx + 0x31], 0x80
je 0x8514e3
xor ebx, ebx
test dl, 3
jne 0x8514e3
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x30]
mov ecx, eax
mov dword [rsp + 0x38], eax
and ecx, 0x80
jne 0x8514e3
and edx, 0x48
mov ebx, ecx
jne 0x8514e3
test byte [r14 + 0x3c], 0x10
jne 0x8514e3
mov rax, qword [rsp + 0x48]
movsxd rdx, dword [rax + 0x14]
mov r12, qword [rax + 0x20]
lea rax, [rdx*8]
sub rax, rdx
lea rax, [r12 + rax*8]
mov qword [rsp + 0x38], rax
cmp bp, 0xa
jle 0x852188
movsx rax, bp
mov ecx, 0x3c
bsr rdx, rax
xor rdx, 0x3f
sub ecx, edx
lea rdx, [0x00966700]
shr rax, cl
lea ecx, [rcx + rcx*4]
and eax, 7
movzx eax, word [rdx + rax*2]
lea eax, [rax + rcx*2 - 3]
mov word [rsp + 0x42], ax
cmp r12, qword [rsp + 0x38]
jae 0x852196
add ebp, eax
lea eax, [rbp - 0x19]
mov word [rsp + 0x44], ax
jmp 0x851f61
xor r8d, r8d
mov rdx, r14
mov rcx, r12
call fcn.00841b20
test eax, eax
je 0x851f70
mov rax, qword [rsi + 0x48]
mov r11d, 1
mov qword [rsi + 0x20], 0
mov word [rsi + 0x18], r11w
mov dword [rsi + 0x3c], 1
mov qword [rax], r12
mov rax, qword [rsp + 0x50]
cmp byte [rax + 0x3f], 2
je 0x852176
test byte [rax + 0x31], 0x40
jne 0x852176
lea eax, [rbp + 0x1c]
test ax, ax
mov ecx, 0
mov r10d, 0x2b
mov edx, 0x2b
cmovs eax, ecx
mov word [rsi + 0x16], r10w
movsx ecx, word [rsp + 0x42]
mov word [rsi + 0x12], ax
call fcn.007dc340
mov dword [rsi + 0x38], 0x4000
mov rdx, rsi
mov rcx, r15
mov word [rsi + 0x14], ax
mov rax, qword [rsp + 0x1b8]
or rax, qword [r12 + 0x28]
mov qword [rsi], rax
call fcn.00856280
test eax, eax
mov ebx, eax
sete dl
add r12, 0x38
cmp qword [rsp + 0x38], r12
jbe 0x852180
test dl, dl
je 0x852180
mov rax, qword [r12 + 0x28]
test qword [rsi + 8], rax
je 0x851ea1
mov edx, 1
xor ebx, ebx
jmp 0x851f4a
or dword [rsi + 0x38], eax
xor ecx, ecx
mov qword [rsp + 0x78], 0
jmp 0x851632
mov rcx, rdx
call fcn.0082d7e0
jmp 0x85175e
mov rax, qword [rcx + 0x1d8]
mov qword [rdx], rax
mov qword [rcx + 0x1d8], rdx
jmp 0x85175e
mov rax, qword [r12 + 0x1c8]
mov qword [rbp], rax
mov qword [r12 + 0x1c8], rbp
jmp 0x8517a0
add eax, 1
mov word [rsi + 0x14], ax
jmp 0x851687
test byte [r14 + 0x40], 2
jne 0x851650
test rcx, rcx
jne 0x8516b7
test byte [rdi + 0x64], 4
jne 0x8516b7
mov rcx, rax
movzx eax, word [rdi + 0x5c]
movzx edx, word [rcx + 0x3c]
cmp ax, dx
jge 0x8516b7
mov rcx, qword [rsp + 0x68]
test byte [rcx + 0x3c], 4
jne 0x8516b7
cmp byte [0x00869367], 0
je 0x8516b7
mov rcx, qword [rcx]
mov rcx, qword [rcx]
test byte [rcx + 0x60], 0x20
jne 0x8516b7
movsx ecx, ax
mov byte [rsi + 0x11], 0
mov eax, ecx
shl eax, 4
sub eax, ecx
movsx ecx, dx
cdq
idiv ecx
movzx ecx, word [rsp + 0x42]
lea eax, [rcx + rax + 1]
mov word [rsi + 0x14], ax
jmp 0x851687
mov dword [rsi + 0x38], 0x100
mov byte [rsp + 0x38], 0
jmp 0x8518da
lea r8, [rsp + 0xc0]
xor eax, eax
mov ecx, 0x14
xor r12d, r12d
mov rdi, r8
mov word [rsp + 0x76], r12w
rep stosq qword [rdi], rax
lea rax, [rsp + 0x72]
mov byte [rsp + 0x122], 5
mov edi, 1
movq xmm0, rax
lea rax, [rsp + 0x74]
mov dword [rsp + 0x11c], 0x10003
movq xmm1, rax
mov rax, qword [rsp + 0x50]
mov byte [rsp + 0x124], 3
movzx edx, byte [r14 + 0x40]
punpcklqdq xmm0, xmm1
mov word [rsp + 0x120], di
movzx ebp, word [rax + 0x3a]
mov qword [rsp + 0xd8], rax
movups xmmword [rsp + 0xc8], xmm0
mov word [rsp + 0x74], bp
test dl, 1
jne 0x85211f
mov rax, qword [r14 + 0x20]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0xe8], rax
xor r9d, r9d
cmp qword [r15 + 0x18], 0
mov rdi, r8
jne 0x8514f0
mov rax, qword [rsp + 0x68]
test word [rax + 0x3c], 0x1020
jne 0x8514ec
mov rax, qword [rax]
mov r13d, 1
mov rax, qword [rax]
test byte [rax + 0x31], 0x80
jne 0x851df1
jmp 0x8514ec
mov rax, qword [rcx + 0x1c8]
mov qword [rdx], rax
mov qword [rcx + 0x1c8], rdx
jmp 0x85175e
movzx eax, word [rsp + 0x44]
jmp 0x851ef4
and r13d, edx
jmp 0x8514e3
xor ebx, ebx
xor eax, eax
mov word [rsp + 0x42], bx
jmp 0x851e87
xor ebx, ebx
jmp 0x8514e3