Function at 0x140016f44
Capabilities:
Get file size
Query or enumerate registry value
Read file on windows
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
lea rbp, [rax - 0x258]
sub rsp, 0x340
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x140035868]
xor rax, rsp
mov qword [rbp + 0x230], rax
mov dword [rsp + 0x4c], r8d
mov rsi, rdx
mov qword [rsp + 0x50], rdx
mov rdi, rcx
xor eax, eax
mov ebx, eax
mov dword [rsp + 0x70], eax
lea rcx, [rbp - 0x80]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
lea rdx, [rbp - 0x20]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
je 0x140017718
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, 1
xor eax, eax
cmp qword [rdi + 0x40], rax
je 0x140016fff
lea rcx, [rdi + 0x18]
lea r8d, [rax + 4]
lea rdx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CFormView::SetOccDialogInfo]
mov ebx, 1
lea rdx, str..xml
mov rcx, qword [rax]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x140016ffa
mov ecx, ebx
mov byte [rsp + 0x48], cl
jmp 0x140017003
xor eax, eax
lea ecx, [rax + 1]
mov byte [rsp + 0x48], al
test cl, bl
je 0x140017012
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
xor eax, eax
cmp byte [rsp + 0x48], al
je 0x140017022
mov rcx, rdi
call fcn.140017828
mov rax, qword [rdi + 0x40]
mov qword [rsp + 0x68], rax
mov rbx, qword [0x1400382e0]
call qword [sym.imp.MFC42u.dll_Ordinal_1463]
mov qword [rax + 0x18], rbx
movsxd rax, dword [rsp + 0x4c]
lea rbx, [rsi + rax*2]
lea rdx, [0x140028db0]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x14001727f
mov rdx, rsi
lea rcx, [rsp + 0x78]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
xor eax, eax
mov ebx, eax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
mov eax, 3
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, eax
mov edx, 0x80000000
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
je 0x1400170fc
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 4
jb 0x1400170f1
xor eax, eax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x4c]
lea r8d, [rax + 4]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400170f1
cmp dword [rsp + 0x4c], 4
jne 0x1400170f1
cmp dword [rsp + 0x70], 0xe011cfd0
mov eax, 1
cmove ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x78]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
xor eax, eax
test ebx, ebx
je 0x140017124
mov edx, 0x18e
mov rcx, rdi
call fcn.14001797c
mov ebx, 0x80004005
jmp 0x1400177f8
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x78], rax
cmp rax, 0xffffffffffffffff
jne 0x14001715c
mov edx, 0x4d8
jmp 0x140017112
mov ecx, SafeArrayPutElement
call qword [sym.imp.MFC42u.dll_CMonthCalCtrl::SetDayState]
mov rsi, rax
mov qword [rsp + 0x40], rax
xor ecx, ecx
test rax, rax
je 0x140017189
mov qword [rax + 8], rcx
mov dword [rax + 0x10], ecx
lea rax, vtable.CNFO6DataSource.0
mov qword [rsi], rax
jmp 0x14001718c
mov rsi, rcx
mov ebx, 0x80004005
test rsi, rsi
je 0x1400171eb
mov qword [rsp + 0x40], rcx
mov r8, qword [rsp + 0x50]
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call fcn.14000d1ec
mov dword [rsp + 0x4c], eax
test eax, eax
js 0x1400171c9
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400171c5
mov qword [rsi + 8], rcx
test eax, eax
jns 0x1400171e3
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
mov rax, qword [rax]
call qword [0x140022358]
mov esi, dword [rsp + 0x4c]
jmp 0x1400171f1
mov qword [rdi + 0x40], rsi
mov esi, eax
jmp 0x1400171f1
mov esi, ebx
mov dword [rsp + 0x4c], ebx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jns 0x1400176e2
mov ecx, SafeArrayPutElement
call qword [sym.imp.MFC42u.dll_CMonthCalCtrl::SetDayState]
mov rsi, rax
mov qword [rsp + 0x40], rax
xor ecx, ecx
test rax, rax
je 0x140017231
mov qword [rax + 8], rcx
mov dword [rax + 0x10], ecx
lea rax, vtable.CNFO7DataSource.0
mov qword [rsi], rax
jmp 0x140017234
mov rsi, rcx
test rsi, rsi
je 0x1400177f8
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.14000648c
mov ebx, eax
test eax, eax
jns 0x140017276
mov rdx, qword [rsi]
mov rax, qword [rdx]
mov edx, 1
mov rcx, rsi
call qword [0x140022358]
mov edx, 0x4d8
mov rcx, rdi
call fcn.14001797c
jmp 0x1400176d8
mov qword [rdi + 0x40], rsi
jmp 0x1400176d8
lea rdx, [0x140028db8]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsicmp]
xor ebx, ebx
test eax, eax
jne 0x1400176c6
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
lea rdx, [0x140022b28]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.140015da0
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov rax, qword [rsp + 0x60]
cmp dword [rax - 8], ebx
je 0x1400176b4
mov rdx, rsi
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
lea rdx, [rsp + 0x60]
lea rcx, [0x140038c38]
call qword [sym.imp.MFC42u.dll_AfxDaoGetEngine]
xor r9d, r9d
lea r8, [0x140015300]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
xor esi, esi
mov ebx, esi
test eax, eax
setne bl
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
test ebx, ebx
je 0x1400176b4
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea ebx, [rsi + 1]
mov r9d, ebx
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftShared_ToolsMSInfo
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400174c8
mov dword [rsp + 0x70], 0x208
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
mov r9d, 0x1000ffff
lea r8, str.incidentfilename
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x140017414
mov word [rbp + 0x1e6], si
cmp dword [rsp + 0x4c], ebx
jne 0x1400173e0
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_AfxDeleteObject]
jmp 0x1400174bd
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
jmp 0x14001711a
mov ebx, 2
cmp eax, ebx
jne 0x1400174bd
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, ebx
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftShared_ToolsMSInfo
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400174bd
lea rdx, str.Incident.xml
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
mov rax, qword [rsp + 0x50]
mov edx, dword [rax - 8]
lea ebx, [rdx + rdx]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDatabase::GetConnectInfo]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.incidentfilename
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_AfxDaoGetEngine]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x40]
mov qword [rbp - 0x78], rax
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
mov rbx, rax
mov qword [rbp - 0x68], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
mov rsi, rax
mov qword [rbp - 0x78], rax
mov edx, 0xa
lea rcx, [rbp - 0x60]
call qword [sym.imp.MFC42u.dll_CDaoQueryDef::CDaoQueryDef]
nop
lea r8, [rbp - 0x60]
mov rdx, rsi
mov rcx, rbx
call fcn.140015aa8
xor eax, eax
lea rcx, [rbp - 0x60]
cmp qword [rbp - 0x58], rax
je 0x1400175ff
call qword [sym.imp.MFC42u.dll_COleControl::XOleInPlaceActiveObject::AddRef]
nop
mov rcx, rsi
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
mov rcx, rbx
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
lea rdx, [0x140028e54]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CCtrlView::CCtrlView]
nop
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_AfxThrowNotSupportedException]
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_AfxDaoGetEngine]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_Ordinal_1284]
mov rbx, qword [rsp + 0x58]
lea rdx, str..xml
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CRichEditView::FindTextW]
mov r8d, 1
add r8d, eax
mov rdx, rbx
mov rcx, rdi
call fcn.140016f44
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
xor eax, eax
mov ebx, eax
jmp 0x1400177f8
call qword [sym.imp.MFC42u.dll_COleControl::XOleInPlaceActiveObject::AddRef]
nop
mov rcx, rsi
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
mov rcx, rbx
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x60]
call fcn.1400153a4
mov rdx, qword [rsp + 0x58]
mov r8d, dword [rdx - 8]
xor r9d, r9d
test r8d, r8d
je 0x14001769d
sub r8d, 1
je 0x14001769d
movsxd rax, r8d
test rax, rax
js 0x140017653
cmp r8d, dword [rdx - 8]
jge 0x140017653
movzx ecx, word [rdx + rax*2]
jmp 0x140017656
mov ecx, r9d
cmp cx, 0x2e
je 0x140017669
mov ecx, 1
sub r8d, ecx
sub rax, rcx
jne 0x140017642
test r8d, r8d
je 0x14001769d
inc r8d
mov rcx, rdi
call fcn.140016f44
mov ebx, eax
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x60]
jmp 0x1400177f1
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov edx, 0x15e
mov rcx, rdi
call fcn.14001797c
jmp 0x140017404
mov edx, 0x166
mov rcx, rdi
call fcn.14001797c
mov ebx, 0x80004005
test ebx, ebx
js 0x1400177f8
jmp 0x1400176e6
mov ebx, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140017707
cmp rcx, qword [rdi + 0x40]
je 0x140017707
mov rax, qword [rcx]
mov edx, 1
mov rax, qword [rax]
call qword [0x140022358]
mov rdx, qword [rdi + 0x40]
mov rcx, rdi
call fcn.140018450
jmp 0x1400177f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
xor esi, esi
test eax, eax
cmovle ebx, eax
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
mov edx, 0x18f
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CPropertySheet::OnCtlColor]
lea edx, [rsi + 0x75]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CPropertySheet::OnCtlColor]
test ebx, ebx
je 0x1400177be
mov ecx, 0x802
call fcn.14001c3bc
mov rsi, rax
xor eax, eax
test rsi, rsi
je 0x14001779a
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x400
mov r9, rsi
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.1400178c0
lea rdx, [0x140028d94]
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_Ordinal_1287]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_Ordinal_1287]
xor esi, esi
jmp 0x1400177c3
mov ebx, 2
mov rdx, qword [rsp + 0x50]
cmp dword [rdx - 8], esi
je 0x1400177e0
xor r9d, r9d
mov r8, qword [rsp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.USER32.dll_MessageBoxW]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop
lea rcx, [rbp - 0x80]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov eax, ebx
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.14001c820
mov rbx, qword [rsp + 0x378]
add rsp, 0x340
pop rdi
pop rsi
pop rbp
ret