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

Disassembly:
mov rax, rsp
mov dword [rax + 0x10], edx
push rbx
push rdi
sub rsp, 0x88
mov qword [rax - 0x18], rbp
mov rbp, qword [rcx]
mov qword [rax - 0x20], rsi
mov qword [rax - 0x28], r12
mov qword [rax - 0x30], r13
xor r13d, r13d
mov qword [rax - 0x38], r14
mov rbx, rcx
mov rcx, qword [rcx + 0x50]
mov dword [rax - 0x68], r13d
mov dword [rax - 0x64], 1
mov rax, qword [rcx]
mov r14d, edx
lea rdx, [rsp + 0x40]
mov r12d, r13d
mov dword [rsp + 0xa0], r13d
call qword [rax + 0x30]
test eax, eax
mov edi, eax
jne 0x140050c46
mov rax, qword [rbx]
mov rsi, qword [rbx + 0x108]
mov rcx, qword [rbx + 0x50]
mov r8d, dword [rax + 8]
mov rdx, rsi
add r8d, 1
call fcn.140010970
test eax, eax
mov edi, eax
jne 0x140050c46
cmp byte [rsi], r12b
je 0x140050876
lea r9, [rsp + 0x34]
xor r8d, r8d
mov rdx, rsi
mov rcx, rbp
call qword [rbp + 0x38]
test eax, eax
mov edi, eax
jne 0x140050c46
cmp dword [rsp + 0x34], r12d
je 0x140050c46
mov r8, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0xb0]
mov edx, r14d
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x58], r15
mov qword [rbx + 0x60], r13
mov esi, r14d
mov dword [rsp + 0xb8], r14d
call fcn.14001e690
test eax, eax
mov edi, eax
jne 0x140050c2f
mov r15d, dword [rsp + 0xa8]
nop
nop
mov r12d, dword [rsp + 0xb0]
mov r10, qword [rsp + 0x40]
cmp r12d, 0xffffffff
mov qword [rsp + 0x48], r12
jne 0x140050914
mov eax, dword [rbx + 0xbc]
mov ecx, dword [rbx + 0xb8]
add eax, 8
movsxd r8, eax
mov rax, r10
sub rax, rcx
cqo
idiv r8
mov r12, rax
mov qword [rsp + 0x48], rax
mov dword [rsp + 0xb0], eax
test r12d, r12d
jne 0x140050957
test r14d, r14d
jne 0x140050957
mov ecx, dword [rbx + 0xb8]
mov rdx, qword [rbx + 0x60]
add rcx, qword [rbx + 0x68]
cmp rcx, rdx
jne 0x140050957
mov eax, dword [rbx + 0xbc]
add eax, 8
movsxd rcx, eax
mov rax, r10
sub rax, rdx
cqo
idiv rcx
mov r12d, eax
mov dword [rsp + 0xb0], eax
mov qword [rsp + 0x48], r12
mov eax, dword [rbx + 0xb8]
cmp qword [rbx + 0x60], rax
jne 0x14005098a
mov esi, dword [rsp + 0x30]
mov rcx, rbx
mov edx, esi
call fcn.14000c1d0
test eax, eax
mov edi, eax
jne 0x140050c39
mov r10, qword [rsp + 0x40]
mov dword [rbx + 0x1c], esi
mov esi, dword [rsp + 0xb8]
test r12d, r12d
mov r14d, r13d
je 0x140050bd3
test esi, esi
je 0x1400509d6
mov rax, qword [rbx + 0x70]
add dword [rbx + 0x84], 1
test rax, rax
je 0x1400509c0
nop
nop
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x1400509b0
mov rcx, qword [rbx + 0x110]
xor edx, edx
call fcn.140010c60
mov dword [rsp + 0xb8], r13d
mov rbp, qword [rbx + 0x50]
mov r9, qword [rbx + 0x60]
mov r13, qword [rbx + 0x108]
mov rax, qword [rbp]
lea rdx, [rsp + 0x38]
mov r8d, 4
mov rcx, rbp
call qword [rax + InitCommonControls]
test eax, eax
mov edi, eax
jne 0x140050b95
mov r9, qword [rbx + 0x60]
mov esi, dword [rsp + 0x38]
mov rax, qword [rbp]
mov r8d, dword [rbx + 0xbc]
add r9, 4
mov rdx, r13
mov rcx, rbp
bswap esi
call qword [rax + InitCommonControls]
test eax, eax
mov edi, eax
jne 0x140050b95
mov eax, dword [rbx + 0xbc]
add eax, 8
cdqe
add qword [rbx + 0x60], rax
test esi, esi
mov r9, qword [rbx + 0x60]
je 0x140050bc7
mov eax, 0x40000000
cdq
idiv dword [rbx + 0xbc]
add eax, 1
cmp esi, eax
je 0x140050bc7
cmp esi, dword [rbx + 0x1c]
ja 0x140050b99
mov rax, qword [rbp]
lea r8d, [rdi + 4]
lea rdx, [rsp + 0x3c]
add r9, 0xfffffffffffffffc
mov rcx, rbp
call qword [rax + InitCommonControls]
test eax, eax
mov edi, eax
jne 0x140050a90
mov r15d, dword [rsp + 0x3c]
bswap r15d
test eax, eax
jne 0x140050b95
mov rdx, r13
mov rcx, rbx
call fcn.140006d10
cmp eax, r15d
jne 0x140050bc7
cmp esi, 1
jne 0x140050ac6
movzx eax, byte [r13 + 0x14]
cmp word [rbx + 0xb2], ax
je 0x140050ac6
mov word [rbx + 0xb2], ax
mov edx, esi
mov rcx, rbx
call fcn.140010120
cmp byte [rbx + 0xb], 0
mov r12, rax
jne 0x140050ae9
mov rcx, qword [rbx + 0x68]
cmp qword [rbx + 0x60], rcx
jle 0x140050ae9
xor eax, eax
mov ecx, eax
jmp 0x140050aee
mov ecx, 1
mov r10, qword [rbx + 0x48]
cmp qword [r10], 0
je 0x140050b40
movzx eax, byte [rbx + 0x14]
cmp al, 4
jae 0x140050b04
test al, al
jne 0x140050b40
test ecx, ecx
je 0x140050b40
movsxd r8, dword [rbx + 0xbc]
mov rax, qword [r10]
lea r9d, [rsi - 1]
imul r9, r8
mov rdx, r13
mov rcx, r10
call qword [rax + 0x18]
cmp esi, dword [rbx + 0x24]
mov edi, eax
jbe 0x140050b2d
mov dword [rbx + 0x24], esi
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140050b40
mov r8, r13
mov edx, esi
call fcn.140049e20
test r12, r12
je 0x140050b90
mov rbp, qword [r12 + 8]
movsxd r8, dword [rbx + 0xbc]
mov rdx, r13
mov rcx, rbp
call sub.msvcrt.dll_memcpy
mov rcx, r12
call qword [rbx + 0x100]
mov rcx, r12
call fcn.14000cb70
cmp esi, 1
jne 0x140050b88
mov rax, qword [rbp + 0x18]
mov qword [rbx + 0x88], rax
mov rax, qword [rbp + 0x20]
mov qword [rbx + 0x90], rax
mov rcx, r12
call fcn.14000cd20
mov r12, qword [rsp + 0x48]
test edi, edi
jne 0x140050bc2
add dword [rsp + 0xa0], 1
mov esi, dword [rsp + 0xb8]
add r14d, 1
cmp r14d, r12d
mov r13d, 0
jb 0x140050996
mov r10, qword [rsp + 0x40]
jmp 0x140050bd3
cmp edi, 0x65
jne 0x140050c0d
mov r10, qword [rsp + 0x40]
xor r13d, r13d
mov qword [rbx + 0x60], r10
mov r14d, dword [rsp + 0xa8]
lea rax, [rsp + 0x30]
lea r9, [rsp + 0xb0]
mov r8, r10
mov rcx, rbx
mov edx, r14d
mov qword [rsp + 0x20], rax
call fcn.14001e690
test eax, eax
mov edi, eax
jne 0x140050c27
mov esi, dword [rsp + 0xb8]
jmp 0x1400508d0
mov r12d, dword [rsp + 0xa0]
cmp edi, 0x20a
mov r13d, 0
cmove edi, r13d
jmp 0x140050c41
mov r12d, dword [rsp + 0xa0]
cmp edi, 0x65
jne 0x140050c41
mov edi, r13d
jmp 0x140050c41
mov r12d, dword [rsp + 0xa0]
mov r15, qword [rsp + 0x58]
test edi, edi
movzx eax, byte [rbx + 0x10]
mov r14, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x80]
mov byte [rbx + 0x16], al
jne 0x140050d0f
mov rax, qword [rbx]
mov rsi, qword [rbx + 0x108]
mov rcx, qword [rbx + 0x50]
mov r8d, dword [rax + 8]
mov rdx, rsi
add r8d, 1
call fcn.140010970
test eax, eax
mov edi, eax
jne 0x140050d0f
movzx eax, byte [rbx + 0x14]
cmp al, 4
jae 0x140050c96
test al, al
jne 0x140050cd6
mov rcx, qword [rbx + 0x48]
mov edi, r13d
cmp qword [rcx], 0
je 0x140050cc0
mov rax, qword [rcx]
xor r8d, r8d
lea edx, [r8 + 0x15]
call qword [rax + 0x50]
cmp eax, 0xc
mov edi, eax
jne 0x140050cbc
mov edi, r13d
jmp 0x140050cc0
test eax, eax
jne 0x140050cd6
cmp byte [rbx + 0xb], 0
jne 0x140050cd6
mov rcx, qword [rbx + 0x48]
movzx edx, byte [rbx + 0xf]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov edi, eax
test edi, edi
jne 0x140050d0f
cmp byte [rsi], dil
mov eax, 0
mov rcx, rbx
setne al
xor r8d, r8d
mov edx, eax
call fcn.140014df0
test eax, eax
mov edi, eax
jne 0x140050d0f
cmp byte [rsi], al
je 0x140050d0f
cmp dword [rsp + 0x34], eax
je 0x140050d0f
mov rdx, rsi
mov rcx, rbx
call fcn.140019be0
mov edi, eax
cmp dword [rsp + 0xa8], 0
mov r13, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
je 0x140050d43
test r12d, r12d
je 0x140050d43
mov r9, qword [rbx + 0xd8]
lea rdx, str.recovered__d_pages_from__s
mov r8d, r12d
mov ecx, 0x21b
call fcn.140034d20
cmp byte [rbx + 0x10], 0
mov r12, qword [rsp + 0x70]
jne 0x140050da8
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x60]
bt eax, 0xc
jb 0x140050da8
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
mov rdx, qword [rax + 0x58]
test rdx, rdx
je 0x140050d91
call rdx
cmp eax, 0x20
jl 0x140050da8
mov ecx, 0x10000
cmp eax, ecx
cmovg eax, ecx
mov dword [rbx + 0xb8], eax
mov eax, edi
add rsp, 0x88
pop rdi
pop rbx
ret
mov eax, 0x1000
mov dword [rbx + 0xb8], eax
mov eax, edi
add rsp, 0x88
pop rdi
pop rbx
ret
mov eax, 0x200
mov dword [rbx + 0xb8], eax
mov eax, edi
add rsp, 0x88
pop rdi
pop rbx
ret