Function at 0x4ad480
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2c8
mov rbp, rcx
test rcx, rcx
je 0x4adb38
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x4ad4b8
call sym.mdb_txn_commit
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov ebx, dword [rbp + 0x7c]
test ebx, 0x20000
jne 0x4ad8b0
mov rsi, qword [rbp]
and ebx, 3
jne 0x4ad8e0
test rsi, rsi
je 0x4ad900
mov rdx, qword [rbp + 0x28]
lea rcx, [rsi + 0x28]
call sym.mdb_midl_append_list
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov rcx, qword [rbp + 0x28]
call sym.mdb_midl_free
mov rax, qword [rbp + 0x10]
mov rcx, qword [rbp + 0x68]
mov r8d, 1
mov qword [rsi + 0x10], rax
mov eax, dword [rbp + 0x7c]
mov dword [rsi + 0x7c], eax
mov edx, dword [rbp + 0x78]
call sym.mdb_cursors_close.isra.0
mov eax, dword [rbp + 0x78]
mov rdx, qword [rbp + 0x58]
mov rcx, qword [rsi + 0x58]
lea r8, [rax + rax*2]
shl r8, 4
call sym.memcpy
mov eax, dword [rbp + 0x78]
mov rdx, qword [rbp + 0x70]
mov dword [rsi + 0x78], eax
mov rax, qword [rsi + 0x70]
movzx edx, byte [rdx]
mov byte [rax], dl
mov rdx, qword [rbp + 0x70]
mov rax, qword [rsi + 0x70]
movzx edx, byte [rdx + 1]
mov byte [rax + 1], dl
cmp dword [rbp + 0x78], 2
mov edx, 2
jbe 0x4ad58a
nop dword [rax + rax]
mov rcx, qword [rsi + 0x70]
mov r8d, edx
mov r9, qword [rbp + 0x70]
add edx, 1
add rcx, r8
movzx eax, byte [rcx]
and eax, 4
or al, byte [r9 + r8]
mov byte [rcx], al
cmp dword [rbp + 0x78], edx
ja 0x4ad568
mov r11, qword [rsi + 0x40]
mov rdi, qword [rsi + 0x48]
mov rbx, qword [rbp + 0x48]
test r11, r11
je 0x4ad655
mov r15, qword [r11]
mov r9d, r15d
test r15d, r15d
je 0x4ad655
mov qword [r11], 0xffffffffffffffff
mov rax, qword [rbx]
mov r12d, r15d
mov r14d, eax
test eax, eax
je 0x4ad61d
mov eax, r15d
mov r10d, 1
nop dword [rax + rax]
mov edx, r10d
shl rdx, 4
mov r8, qword [rbx + rdx]
mov edx, eax
lea rcx, [r11 + rdx*8]
mov rdx, qword [rcx]
add r8, r8
cmp r8, rdx
jbe 0x4ad602
nop dword [rax]
lea edx, [rax - 1]
lea rcx, [r11 + rdx*8]
mov rax, rdx
mov rdx, qword [rcx]
cmp rdx, r8
jb 0x4ad5f0
cmp r8, rdx
jne 0x4ad614
mov qword [rcx], 1
sub eax, 1
mov r12d, eax
add r10d, 1
cmp r14d, r10d
jae 0x4ad5d0
lea eax, [r12 + 1]
cmp r15d, eax
jb 0x4ad64f
nop word [rax + rax]
mov edx, eax
mov rdx, qword [r11 + rdx*8]
test dl, 1
jne 0x4ad647
lea ecx, [r12 + 1]
mov qword [r11 + rcx*8], rdx
mov r12, rcx
add eax, 1
cmp r9d, eax
jae 0x4ad630
mov eax, r12d
mov qword [r11], rax
mov rdx, qword [rbp + 0x40]
test rdx, rdx
je 0x4ad6b7
cmp qword [rdx], 0
je 0x4ad6b7
mov r12d, 1
mov eax, 1
nop
mov rax, qword [rdx + rax*8]
test al, 1
jne 0x4ad6aa
shr rax, 1
mov rcx, rdi
mov rdx, rax
mov r14, rax
call sym.mdb_mid2l_search
mov r15d, eax
mov eax, eax
cmp rax, qword [rdi]
ja 0x4ad6a6
mov rdx, rax
shl rdx, 4
add rdx, rdi
cmp qword [rdx], r14
je 0x4ade1e
mov rdx, qword [rbp + 0x40]
lea eax, [r12 + 1]
mov r12, rax
cmp rax, qword [rdx]
jbe 0x4ad670
mov r12, qword [rdi]
cmp qword [rsi], 0
mov qword [rdi], 0
mov r14d, r12d
je 0x4adb43
mov eax, r12d
mov r9d, dword [rbx]
mov rcx, rbx
shl rax, 4
mov rdx, qword [rdi + rax]
add r9d, r12d
mov dword [rsp + 0x38], r9d
add rdx, 1
call sym.mdb_mid2l_search
mov r9d, dword [rsp + 0x38]
cmp eax, 1
lea r8d, [rax - 1]
je 0x4ad759
test r12d, r12d
je 0x4ad759
mov edx, r12d
nop word cs:[rax + rax]
mov eax, r8d
shl rax, 4
mov rcx, qword [rbx + rax]
mov eax, edx
shl rax, 4
mov rax, qword [rdi + rax]
cmp rcx, rax
jae 0x4ad743
nop word [rax + rax]
lea eax, [rdx - 1]
mov rdx, rax
shl rax, 4
mov rax, qword [rdi + rax]
cmp rax, rcx
ja 0x4ad730
cmp rcx, rax
jne 0x4ad74f
sub edx, 1
sub r9d, 1
sub r8d, 1
je 0x4ad759
test edx, edx
jne 0x4ad710
mov rdx, qword [rbx]
test edx, edx
je 0x4ad80c
mov eax, edx
mov dword [rsp + 0x38], r9d
shl rax, 4
lea rcx, [rbx + rax - 0x10]
lea r12, [rbx + rax]
mov ebx, r14d
lea eax, [rdx - 1]
shl rax, 4
sub rcx, rax
mov eax, r9d
mov r14, rcx
nop dword [rax + rax]
mov edx, ebx
mov r8, qword [r12]
shl rdx, 4
add rdx, rdi
mov r10, qword [rdx]
cmp r10, r8
jbe 0x4add08
lea r9d, [rbx - 1]
mov r15d, eax
sub r9d, eax
nop dword [rax + rax]
lea ecx, [r9 + r15]
movdqu xmm0, xmmword [rdx]
mov eax, r15d
sub r15d, 1
mov edx, ecx
shl rax, 4
shl rdx, 4
movups xmmword [rdi + rax], xmm0
add rdx, rdi
mov r10, qword [rdx]
cmp r10, r8
ja 0x4ad7b8
mov ebx, ecx
cmp r8, r10
je 0x4adb60
movdqu xmm1, xmmword [r12]
lea eax, [r15 - 1]
sub r12, 0x10
shl r15, 4
movups xmmword [rdi + r15], xmm1
cmp r14, r12
jne 0x4ad790
mov r9d, dword [rsp + 0x38]
mov eax, r9d
mov rcx, qword [rbp + 0x48]
mov qword [rdi], rax
call sym.free
mov eax, dword [rbp + 0x80]
mov rdx, qword [rbp + 0x40]
mov dword [rsi + 0x80], eax
test rdx, rdx
je 0x4ad861
cmp qword [rsi + 0x40], 0
je 0x4add7d
lea rcx, [rsi + 0x40]
call sym.mdb_midl_append_list
mov r13d, eax
test eax, eax
je 0x4ad84f
or dword [rsi + 0x7c], 2
mov rcx, qword [rbp + 0x40]
call sym.mdb_midl_free
mov rcx, qword [rsi + 0x40]
call sym.mdb_midl_sort
mov rax, qword [rsi + 0x30]
test rax, rax
je 0x4ade0a
nop
mov rdx, rax
mov rax, qword [rax + 0x30]
test rax, rax
jne 0x4ad870
add rdx, 0x30
mov rax, qword [rbp + 0x30]
mov rcx, qword [rbp + 0x88]
mov qword [rdx], rax
mov eax, dword [rbp + 0x38]
add dword [rsi + 0x38], eax
mov qword [rsi + 8], 0
call sym.mdb_midl_free
mov rcx, rbp
call sym.free
jmp 0x4ad8c0
mov edx, 0x200031
mov rcx, rbp
xor r13d, r13d
call sym.mdb_txn_end
mov eax, r13d
add rsp, 0x2c8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r13d, 0xffff87c2
test rsi, rsi
je 0x4ad8f0
or dword [rsi + 0x7c], 2
nop
mov rcx, rbp
call sym.mdb_txn_abort
jmp 0x4ad8c0
mov rax, qword [rbp + 0x20]
mov r13d, 0x16
mov qword [rsp + 0x48], rax
cmp qword [rax + 0x68], rbp
jne 0x4ad8f0
mov edx, dword [rbp + 0x78]
mov rcx, qword [rbp + 0x68]
xor r8d, r8d
call sym.mdb_cursors_close.isra.0
mov rax, qword [rbp + 0x48]
cmp qword [rax], 0
jne 0x4ad938
test byte [rbp + 0x7c], 0xc
je 0x4ad8b0
cmp dword [rbp + 0x78], 2
jbe 0x4add86
lea r12, [rsp + 0x130]
xor r9d, r9d
mov r8d, 1
mov rdx, rbp
mov qword [rsp + 0xa0], 0x30
mov rcx, r12
call sym.mdb_cursor_init
cmp dword [rbp + 0x78], 2
mov r14, qword [rbp + 0x20]
jbe 0x4ad9eb
mov esi, 2
lea rdi, [rsp + 0xa0]
nop dword [rax]
mov rdx, qword [rbp + 0x70]
mov eax, esi
test byte [rdx + rax], 1
je 0x4ad9e3
mov rdx, qword [r14 + 0xa0]
mov rcx, qword [rbp + 0x60]
mov edx, dword [rdx + rax*4]
cmp dword [rcx + rax*4], edx
jne 0x4ade13
lea rdx, [rax + rax*2]
mov rax, qword [rbp + 0x58]
mov r8, rdi
mov rcx, r12
shl rdx, 4
mov r9d, 2
add rax, rdx
add rdx, qword [rbp + 0x50]
mov qword [rsp + 0xa8], rax
call sym.mdb_cursor_put
test eax, eax
jne 0x4add51
mov r14, qword [rbp + 0x20]
add esi, 1
cmp dword [rbp + 0x78], esi
ja 0x4ad988
mov eax, dword [r14 + 0xe0]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov qword [rsp + 0x70], 0
mov rcx, r12
mov dword [rsp + 0x60], eax
call sym.mdb_cursor_init
cmp qword [r14 + 0xb8], 0
je 0x4addb4
mov r8d, 5
xor edx, edx
mov rcx, r12
call sym.mdb_page_search
mov r13d, eax
test eax, eax
je 0x4ada40
cmp eax, 0xffff87b2
jne 0x4ad8f0
cmp qword [r14 + 0xb8], 0
je 0x4addb4
movsxd rax, dword [rsp + 0x60]
test dword [r14 + 0x18], 0x1080000
movabs rdx, 0x7fffffffffffffff
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
cmove rdx, rax
lea eax, [rax + 1]
xor esi, esi
xor edi, edi
cdqe
mov dword [rsp + 0x64], 1
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x68], rax
nop word cs:[rax + rax]
mov rax, qword [rsp + 0x40]
cmp qword [r14 + 0xc0], rax
ja 0x4adc80
mov rax, qword [rbp + 0x28]
cmp qword [rax], rdi
jbe 0x4adb78
test rdi, rdi
je 0x4add59
lea rdx, [rbp + 0x18]
lea r15, [rsp + 0xa0]
mov qword [rsp + 0x80], 8
mov rdi, qword [rax]
mov qword [rsp + 0x88], rdx
lea r13, [rsp + 0x80]
mov r9d, 0x10000
mov r8, r15
mov rdx, r13
mov rcx, r12
lea rax, [rdi*8 + 8]
mov qword [rsp + 0xa0], rax
call sym.mdb_cursor_put
test eax, eax
jne 0x4add51
mov rdx, qword [rbp + 0x28]
mov rax, qword [rdx]
cmp rax, rdi
jbe 0x4adcd8
mov rdi, rax
jmp 0x4adaf3
mov r13d, 0x16
jmp 0x4ad8c0
mov eax, 0x1ffff
sub eax, dword [rbp + 0x80]
mov r9d, eax
jmp 0x4ad759
mov rcx, qword [rdx + 8]
sub ebx, 1
call sym.free
jmp 0x4ad7eb
mov r9, qword [r14 + 0xb8]
xor edx, edx
test r9, r9
je 0x4adb89
mov rdx, qword [r9]
movsxd rax, dword [rbp + 0x38]
mov r8, rax
add rax, rdx
mov rdx, qword [rsp + 0x38]
cmp rax, rdx
jg 0x4add31
je 0x4ade70
mov ecx, dword [rsp + 0x64]
test ecx, ecx
je 0x4ade6b
sub rdx, rsi
mov dword [rsp + 0x64], 0
movsxd rcx, dword [rsp + 0x60]
mov qword [rsp + 0x38], rdx
sub rax, qword [rsp + 0x38]
cmp rax, rcx
jle 0x4add20
mov r8, qword [rsp + 0x70]
cmp r8, 1
jbe 0x4add20
xor edx, edx
div r8
cqo
mov rsi, rax
idiv qword [rsp + 0x68]
sub rcx, rdx
add rsi, rcx
lea rax, [rsp + 0x70]
lea r13, [rsp + 0x80]
mov rcx, r12
mov r9d, 0x10000
mov qword [rsp + 0x88], rax
mov rdx, r13
lea rax, [rsi*8 + 8]
lea r8, [rsp + 0xa0]
mov qword [rsp + 0x80], 8
mov qword [rsp + 0xa0], rax
call sym.mdb_cursor_put
test eax, eax
jne 0x4add51
mov rdx, qword [rsp + 0xa8]
cmp rsi, qword [rsp + 0x58]
jle 0x4add45
mov rax, rsi
nop word [rax + rax]
mov qword [rdx + rax*8], 0
sub rax, 1
jns 0x4adc68
add qword [rsp + 0x38], rsi
jmp 0x4adaa0
lea r13, [rsp + 0x80]
xor r8d, r8d
mov rcx, r12
mov rdx, r13
call sym.mdb_cursor_first
test eax, eax
jne 0x4add51
mov rax, qword [rsp + 0x88]
xor edx, edx
mov rcx, r12
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x70], rax
call sym.mdb_cursor_del
test eax, eax
jne 0x4add51
mov qword [rsp + 0x38], 0
xor esi, esi
jmp 0x4adaa0
mov rcx, rdx
mov qword [rsp + 0x50], rdx
call sym.mdb_midl_sort
mov r8, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0xa8]
call sym.memcpy
jmp 0x4adaa0
mov ecx, ebx
mov r15d, eax
jmp 0x4ad7e0
sub qword [rsp + 0x38], rsi
mov rcx, qword [rsp + 0x38]
sub rax, rcx
nop
test rax, rax
mov esi, 0
cmovns rsi, rax
jmp 0x4adbfa
movsxd rcx, dword [rsp + 0x60]
cmp rcx, rsi
jle 0x4add97
sub qword [rsp + 0x38], rsi
jmp 0x4adbc8
mov qword [rdx], 0
jmp 0x4adc76
mov r13d, eax
jmp 0x4ad8f0
xor edx, edx
mov r8d, 9
mov rcx, r12
call sym.mdb_page_search
test eax, eax
je 0x4add74
cmp eax, 0xffff87b2
jne 0x4add51
mov rax, qword [rbp + 0x28]
jmp 0x4adac8
mov qword [rsi + 0x40], rdx
jmp 0x4ad861
mov r14, qword [rbp + 0x20]
lea r12, [rsp + 0x130]
jmp 0x4ad9eb
mov rdx, qword [rsp + 0x70]
cmp rdx, 1
jbe 0x4add12
sub rdx, 1
mov qword [rsp + 0x70], rdx
jmp 0x4adbc8
mov rsi, qword [rbp + 0x30]
test rsi, rsi
je 0x4ada4e
mov edx, dword [rbp + 0x38]
lea rcx, [rbp + 0x28]
call sym.mdb_midl_need
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov rdx, qword [rbp + 0x28]
mov rax, qword [rdx]
add rax, 1
mov qword [rdx], rax
mov rcx, qword [rsi]
mov rsi, qword [rsi + 0x30]
mov qword [rdx + rax*8], rcx
test rsi, rsi
jne 0x4adddc
mov qword [rbp + 0x30], 0
mov dword [rbp + 0x38], 0
jmp 0x4ada4e
lea rdx, [rsi + 0x30]
jmp 0x4ad880
mov r13d, 0xffff87c4
jmp 0x4ad8f0
mov rcx, qword [rdx + 8]
mov qword [rsp + 0x38], rax
call sym.free
mov rdx, qword [rdi]
mov rax, qword [rsp + 0x38]
cmp rdx, rax
jbe 0x4ade5f
add r15d, 1
mov rdx, rax
mov eax, r15d
shl rdx, 4
mov rcx, rax
shl rcx, 4
movdqu xmm2, xmmword [rdi + rcx]
movups xmmword [rdi + rdx], xmm2
mov rdx, qword [rdi]
cmp rax, rdx
jb 0x4ade39
sub rdx, 1
mov qword [rdi], rdx
jmp 0x4ad6a6
mov qword [rsp + 0x38], rax
mov rsi, qword [rbp + 0x30]
test rsi, rsi
je 0x4adf09
lea edx, [r8 + r8 + 1]
lea rcx, [r14 + 0xb8]
mov dword [rsp + 0x38], r8d
call sym.mdb_midl_need
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov r9, qword [r14 + 0xb8]
mov r8d, dword [rsp + 0x38]
mov rax, qword [r9 - 8]
sub rax, r8
lea r13, [r9 + rax*8]
mov rdx, qword [rsi]
mov rsi, qword [rsi + 0x30]
lea eax, [rbx + 1]
mov rbx, rax
mov qword [r13 + rax*8], rdx
test rsi, rsi
jne 0x4adeb5
mov qword [r13], rax
mov rcx, r13
mov qword [rsp + 0x38], r9
call sym.mdb_midl_sort
mov r9, qword [rsp + 0x38]
mov rdx, r13
mov rcx, r9
call sym.mdb_midl_xmerge
mov r9, qword [rsp + 0x38]
mov qword [rbp + 0x30], 0
mov dword [rbp + 0x38], 0
mov rax, qword [r9]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x4ae27c
mov rsi, qword [rsp + 0x48]
mov rcx, qword [rsi + 0xb8]
call sym.mdb_midl_free
lea rcx, [rbp + 0x28]
mov qword [rsi + 0xb8], 0
call sym.mdb_midl_shrink
xor edx, edx
mov rcx, rbp
call sym.mdb_page_flush
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov r9d, dword [rbp + 0x7c]
mov r8, qword [rbp + 0x10]
test r9d, 0x10000
jne 0x4adf7d
xor edx, edx
mov rcx, rsi
call sym.mdb_env_sync0
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov r9d, dword [rbp + 0x7c]
mov r8, qword [rbp + 0x10]
mov rbx, qword [rbp + 0x18]
mov rdi, qword [rbp + 0x20]
mov rdx, rbx
mov ecx, dword [rdi + 0x18]
mov rax, rbx
not rdx
and eax, 1
and edx, 1
or r9d, ecx
add rax, 0xa
add rdx, 0xa
mov r10d, r9d
mov rax, qword [rdi + rax*8]
mov rdx, qword [rdi + rdx*8]
mov r11, qword [rdx + 0x10]
cmp qword [rdi + 0x78], r11
cmovae r11, qword [rdi + 0x78]
sub r8, 1
and r10d, 0x50000
and r9d, 0x80000
mov rdx, qword [rbp + 0x58]
je 0x4ae08d
movdqu xmm3, xmmword [rdx]
mov qword [rax + 0x10], r11
movups xmmword [rax + 0x18], xmm3
movdqu xmm4, xmmword [rdx + 0x10]
movups xmmword [rax + 0x28], xmm4
movdqu xmm5, xmmword [rdx + 0x20]
movups xmmword [rax + 0x38], xmm5
movdqu xmm3, xmmword [rdx + 0x30]
movups xmmword [rax + 0x48], xmm3
movdqu xmm4, xmmword [rdx + 0x40]
movups xmmword [rax + 0x58], xmm4
movdqu xmm5, xmmword [rdx + 0x50]
mov qword [rax + 0x78], r8
mov qword [rax + 0x80], rbx
movups xmmword [rax + 0x68], xmm5
test r10d, r10d
jne 0x4ae047
shr ecx, 0x14
mov r8d, dword [rdi + 0x1c]
mov edx, ecx
lea rcx, [rax - 0x10]
xor edx, 1
and edx, 1
mov dword [rsp + 0x78], edx
mov edx, r8d
call qword [sym.imp.KERNEL32.dll_FlushViewOfFile]
test eax, eax
je 0x4ae26d
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x4ae058
mov rdx, qword [rbp + 0x18]
mov qword [rax + 8], rdx
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x18]
test eax, 0x2000000
je 0x4ae237
test eax, 0x400000
je 0x4ae24a
mov rbx, qword [rsp + 0x48]
xor eax, 0x2000000
mov edx, 0x10
mov dword [rbx + 0x18], eax
jmp 0x4ad8b5
movdqu xmm3, xmmword [rdx]
mov rcx, qword [rax + 0x80]
mov r15, qword [rax + 0x78]
sub rax, qword [rdi + 0x40]
mov qword [rsp + 0xb0], r11
movups xmmword [rsp + 0xb8], xmm3
movdqu xmm4, xmmword [rdx + 0x10]
mov qword [rsp + 0x1b0], rcx
movups xmmword [rsp + 0xc8], xmm4
movdqu xmm5, xmmword [rdx + 0x20]
movups xmmword [rsp + 0xd8], xmm5
movdqu xmm3, xmmword [rdx + 0x30]
movups xmmword [rsp + 0xe8], xmm3
movdqu xmm4, xmmword [rdx + 0x40]
movups xmmword [rsp + 0xf8], xmm4
movdqu xmm5, xmmword [rdx + 0x50]
mov qword [rsp + 0x120], rbx
lea rbx, [rax + 0x10]
mov qword [rsp + 0x118], r8
movups xmmword [rsp + 0x108], xmm5
test r10d, r10d
je 0x4ae241
mov rcx, qword [rdi]
lea r14, [rsp + 0x80]
lea r13, [rsp + 0xb0]
mov qword [rsp + 0x90], 0
mov rsi, qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x90], ebx
lea r9, [rsp + 0x78]
mov r8d, 0x78
mov rdx, r13
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x20], r14
call rsi
test eax, eax
jne 0x4ae218
mov dword [rsp + 0x78], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
xor r9d, r9d
mov r8d, 0x78
mov rdx, r13
mov rax, qword [rsp + 0x1b0]
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x20], r14
mov rcx, qword [rdi]
mov qword [rsp + 0x118], r15
mov qword [rsp + 0x120], rax
mov dword [rsp + 0x90], ebx
call rsi
or dword [rdi + 0x18], 0x80000000
mov r13d, dword [rsp + 0x78]
test r13d, r13d
jne 0x4ad8f0
jmp 0x4ae058
mov eax, dword [rsp + 0x78]
cmp eax, 0x78
je 0x4ae047
test eax, eax
js 0x4ae18c
mov eax, 5
jmp 0x4ae192
mov edx, 0x10
jmp 0x4ad8b5
mov rcx, qword [rdi + 0x10]
jmp 0x4ae119
mov rsi, qword [rsp + 0x48]
mov rdx, r12
mov rcx, rsi
call fcn.008611d0
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov eax, dword [rsi + 0x18]
jmp 0x4ae076
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
jmp 0x4ae1fb
mov rax, qword [rsp + 0x38]
lea r14, [rsp + 0x80]
lea r8, [rsp + 0xa0]
mov rcx, r12
mov rdx, r14
mov qword [rsp + 0x40], r8
lea rbx, [r9 + rax*8]
call sym.mdb_cursor_first
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov r8, qword [rsp + 0x40]
lea rsi, [rsp + 0x78]
mov r15, r8
jmp 0x4ae32e
mov r9d, 0x40
mov r8, r15
mov rdx, r14
mov rcx, r12
lea rax, [rdi*8]
sub rbx, rax
mov r10, qword [rbx]
mov qword [rsp + 0xa8], rbx
mov qword [rbx], rdi
mov qword [rsp + 0x40], r10
call sym.mdb_cursor_put
mov r10, qword [rsp + 0x40]
mov r13d, eax
mov qword [rbx], r10
test eax, eax
jne 0x4ad8f0
sub qword [rsp + 0x38], rdi
je 0x4adf15
mov r9d, 8
mov r8, r15
mov rdx, r14
mov rcx, r12
call sym.mdb_cursor_next
mov r13d, eax
test eax, eax
jne 0x4ad8f0
mov rax, qword [rsp + 0x88]
mov rdi, qword [rsp + 0xa0]
mov rax, qword [rax]
shr rdi, 3
mov qword [rsp + 0x88], rsi
sub rdi, 1
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x38]
cmp rdi, rax
jle 0x4ae2bf
mov rdi, rax
mov r8, r15
mov r9d, 0x40
mov rdx, r14
lea rax, [rax*8 + 8]
mov rcx, r12
sub rbx, rax
mov qword [rsp + 0xa0], rax
add rbx, 8
mov rsi, qword [rbx]
mov qword [rsp + 0xa8], rbx
mov qword [rbx], rdi
call sym.mdb_cursor_put
mov qword [rbx], rsi
mov r13d, eax
test eax, eax
je 0x4adf15
jmp 0x4ad8f0