Function at 0x49e660
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, 0x208
xor r11d, r11d
mov r12, qword [rcx + 0x20]
mov rdi, qword [r12 + 0xb8]
mov qword [rsp + 0x260], r8
mov r13, rcx
movsxd rbp, edx
test rdi, rdi
je 0x49e698
mov r11d, dword [rdi]
cmp ebp, 1
je 0x49eb40
mov rax, qword [rsp + 0x260]
mov ecx, dword [r13 + 0x80]
mov qword [rax], 0
test ecx, ecx
je 0x49eb70
imul eax, ebp, 0x3c
mov edx, 1
xor esi, esi
mov r14d, r11d
sub edx, ebp
mov dword [rsp + 0x20], 0
lea r15, [rsp + 0x70]
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x3c], eax
lea eax, [rbp - 1]
mov dword [rsp + 0x28], eax
xor eax, eax
cmp dword [rsp + 0x28], r14d
jb 0x49e8f6
nop word [rax + rax]
test eax, eax
je 0x49eaa0
mov rcx, qword [rsp + 0x48]
add rcx, 1
mov qword [rsp + 0x48], rcx
cmp rcx, rsi
jb 0x49e7a5
mov edx, dword [rsp + 0x20]
test edx, edx
jne 0x49e9b0
mov rdx, qword [r13 + 0x20]
mov rsi, qword [r13 + 0x18]
mov r10, qword [rdx + 0x48]
sub rsi, 1
test r10, r10
je 0x49e78c
movsxd r8, dword [r10 + 0x10]
mov r9d, r8d
sub r9d, 1
js 0x49e78c
movsxd rdx, r9d
shl r8, 6
mov r9d, r9d
add rdx, 2
shl r9, 6
shl rdx, 6
add rdx, r10
add r10, r8
sub r10, r9
nop dword [rax]
mov r8d, dword [rdx + 8]
test r8d, r8d
je 0x49e783
mov r8, qword [rdx]
cmp rsi, r8
cmova rsi, r8
sub rdx, 0x40
cmp rdx, r10
jne 0x49e770
mov qword [r12 + 0xb0], rsi
cmp rcx, rsi
jae 0x49e9b0
mov dword [rsp + 0x20], 1
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov r9d, eax
mov rcx, r15
call sym.mdb_cursor_get
test eax, eax
jne 0x49ebbc
mov rax, qword [rsp + 0x58]
mov r8, qword [rax]
mov qword [rsp + 0x48], r8
cmp r8, rsi
jb 0x49e863
mov eax, dword [rsp + 0x20]
test eax, eax
jne 0x49e9b0
mov rax, qword [r13 + 0x18]
lea rsi, [rax - 1]
mov rax, qword [r13 + 0x20]
mov r10, qword [rax + 0x48]
test r10, r10
je 0x49e84a
mov edx, dword [r10 + 0x10]
mov r9d, edx
sub r9d, 1
js 0x49e84a
movsxd rax, r9d
movsxd rcx, edx
mov r9d, r9d
shl rcx, 6
add rax, 2
shl r9, 6
shl rax, 6
add rcx, r10
add rax, r10
sub rcx, r9
nop word cs:[rax + rax]
mov edx, dword [rax + 8]
test edx, edx
je 0x49e841
mov rdx, qword [rax]
cmp rsi, rdx
cmova rsi, rdx
sub rax, 0x40
cmp rcx, rax
jne 0x49e830
mov qword [r12 + 0xb0], rsi
cmp r8, rsi
jae 0x49e9b0
mov dword [rsp + 0x20], 1
movzx eax, word [rsp + 0xb2]
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x60]
mov rcx, r15
mov rdx, qword [rsp + rax*8 + 0xb8]
movzx eax, word [rsp + rax*2 + 0x1b8]
movzx eax, word [rdx + rax*2 + 0x10]
add rdx, rax
call sym.mdb_node_read.isra.0
test eax, eax
jne 0x49ea8b
mov r14, qword [rsp + 0x68]
mov rdx, qword [r14]
test rdi, rdi
je 0x49eb00
lea rcx, [r12 + 0xb8]
call sym.mdb_midl_need
test eax, eax
jne 0x49eb2d
mov rdi, qword [r12 + 0xb8]
mov rax, qword [rsp + 0x48]
mov rdx, r14
mov rcx, rdi
mov qword [r12 + 0xc0], rax
call sym.mdb_midl_xmerge
mov r14d, dword [rdi]
mov eax, 8
cmp dword [rsp + 0x28], r14d
jae 0x49e700
mov edx, r14d
mov r9d, dword [rsp + 0x28]
mov r11d, dword [rsp + 0x38]
mov ebx, r14d
lea rcx, [rdi + rdx*8]
jmp 0x49e921
lea edx, [rbx - 1]
sub rcx, 8
cmp ebx, ebp
je 0x49e9a0
mov ebx, edx
mov r10, qword [rcx]
lea edx, [r11 + rbx]
lea r8, [r10 + r9]
cmp qword [rdi + rdx*8], r8
jne 0x49e910
mov eax, dword [r12 + 0x18]
mov r11d, r14d
and eax, 0x80000
test eax, eax
je 0x49eb80
mov esi, dword [r12 + 0x1c]
imul rsi, r10
add rsi, qword [r12 + 0x40]
test ebx, ebx
je 0x49ea40
mov eax, r11d
mov edx, ebx
sub eax, ebp
sub edx, ebp
mov ecx, eax
mov qword [rdi], rcx
cmp eax, edx
jbe 0x49ea47
lea eax, [rdx + 1]
lea rax, [rdi + rax*8]
nop word [rax + rax]
lea edx, [rbx + 1]
add rax, 8
mov rbx, rdx
mov rdx, qword [rdi + rdx*8]
mov qword [rax - 8], rdx
cmp r11d, ebx
jne 0x49e980
jmp 0x49ea47
sub dword [rsp + 0x3c], 1
jns 0x49e700
nop dword [rax + rax]
mov r11d, r14d
mov r10, qword [r13 + 0x10]
movsxd rax, ebp
add rax, r10
cmp rax, qword [r12 + 0x88]
jae 0x49eb28
mov ebx, dword [r12 + 0x18]
mov eax, ebx
and eax, 0x80000
and ebx, 0x20000
jne 0x49ebb5
mov ecx, dword [r12 + 0x1c]
mov dword [rsp + 0x28], r11d
mov r8d, 0x1000
mov qword [rsp + 0x20], r10
mov rdx, rcx
imul rcx, r10
add rcx, qword [r12 + 0x40]
cmp eax, 1
sbb eax, eax
imul edx, ebp
and eax, 0xfffffffe
lea r9d, [rax + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x49ebcf
mov eax, dword [r12 + 0x18]
mov r10, qword [rsp + 0x20]
mov r11d, dword [rsp + 0x28]
and eax, 0x80000
jmp 0x49e93f
add rbp, r10
mov qword [r13 + 0x10], rbp
test byte [r13 + 0x7e], 8
lea rdx, [sym.mdb_mid2l_insert]
mov rcx, qword [r13 + 0x48]
mov qword [rsi], r10
lea rax, [sym.mdb_mid2l_append]
mov qword [rsp + 0x60], r10
cmove rax, rdx
mov qword [rsp + 0x68], rsi
lea rdx, [rsp + 0x60]
call rax
mov rax, qword [rsp + 0x260]
sub dword [r13 + 0x80], 1
mov qword [rax], rsi
xor eax, eax
add rsp, 0x208
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
mov dword [rsp + 0x34], eax
mov rdx, qword [r12 + 0xc0]
mov rsi, qword [r12 + 0xb0]
mov qword [rsp + 0x48], rdx
mov rdx, r13
call sym.mdb_cursor_init
mov rcx, qword [rsp + 0x48]
mov eax, dword [rsp + 0x34]
test rcx, rcx
je 0x49e70d
mov qword [rsp + 0x50], 8
lea rax, [rsp + 0x48]
mov qword [rsp + 0x58], rax
mov eax, 0x11
jmp 0x49e70d
mov ecx, edx
call sym.mdb_midl_alloc
mov qword [r12 + 0xb8], rax
mov rdi, rax
test rax, rax
jne 0x49e8cb
mov eax, 0xc
jmp 0x49eb2d
mov eax, 0xffff87b8
or dword [r13 + 0x7c], 2
jmp 0x49ea8b
mov rax, qword [r13 + 0x30]
test rax, rax
je 0x49e6a1
mov rdx, qword [rax + 0x30]
mov rdi, qword [rsp + 0x260]
sub dword [r13 + 0x38], 1
mov qword [r13 + 0x30], rdx
mov qword [rdi], rax
xor eax, eax
jmp 0x49ea8b
mov eax, 0xffff87bc
jmp 0x49eb2d
mov rcx, qword [r13 + 0x20]
lea rdx, [r13 + 0x7c]
mov r8d, ebp
mov qword [rsp + 0x28], r10
mov dword [rsp + 0x20], r11d
call sym.mdb_page_malloc.isra.0
mov r11d, dword [rsp + 0x20]
mov r10, qword [rsp + 0x28]
test rax, rax
mov rsi, rax
jne 0x49e955
jmp 0x49eb1b
xor ebx, ebx
jmp 0x49e93f
mov r11d, r14d
cmp eax, 0xffff87b2
je 0x49e9b3
jmp 0x49eb2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x49eb2d