Function at 0x1400172ac
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 0x140017a80
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, 1
xor eax, eax
cmp qword [rdi + 0x40], rax
je 0x140017367
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 0x140017362
mov ecx, ebx
mov byte [rsp + 0x48], cl
jmp 0x14001736b
xor eax, eax
lea ecx, [rax + 1]
mov byte [rsp + 0x48], al
test cl, bl
je 0x14001737a
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
xor eax, eax
cmp byte [rsp + 0x48], al
je 0x14001738a
mov rcx, rdi
call fcn.140017b90
mov rax, qword [rdi + 0x40]
mov qword [rsp + 0x68], rax
mov rbx, qword [0x1400382c0]
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, [0x140028f20]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
jne 0x1400175e7
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 0x140017464
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 4
jb 0x140017459
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 0x140017459
cmp dword [rsp + 0x4c], 4
jne 0x140017459
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 0x14001748c
mov edx, 0x18e
mov rcx, rdi
call fcn.140017cf4
mov ebx, 0x80004005
jmp 0x140017b60
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 0x1400174c4
mov edx, 0x4d8
jmp 0x14001747a
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 0x1400174f1
mov qword [rax + 8], rcx
mov dword [rax + 0x10], ecx
lea rax, vtable.CNFO6DataSource.0
mov qword [rsi], rax
jmp 0x1400174f4
mov rsi, rcx
mov ebx, 0x80004005
test rsi, rsi
je 0x140017553
mov qword [rsp + 0x40], rcx
mov r8, qword [rsp + 0x50]
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x78]
call fcn.14000d1fc
mov dword [rsp + 0x4c], eax
test eax, eax
js 0x140017531
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14001752d
mov qword [rsi + 8], rcx
test eax, eax
jns 0x14001754b
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
mov rax, qword [rax]
call qword [0x140022378]
mov esi, dword [rsp + 0x4c]
jmp 0x140017559
mov qword [rdi + 0x40], rsi
mov esi, eax
jmp 0x140017559
mov esi, ebx
mov dword [rsp + 0x4c], ebx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jns 0x140017a4a
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 0x140017599
mov qword [rax + 8], rcx
mov dword [rax + 0x10], ecx
lea rax, vtable.CNFO7DataSource.0
mov qword [rsi], rax
jmp 0x14001759c
mov rsi, rcx
test rsi, rsi
je 0x140017b60
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.140006478
mov ebx, eax
test eax, eax
jns 0x1400175de
mov rdx, qword [rsi]
mov rax, qword [rdx]
mov edx, 1
mov rcx, rsi
call qword [0x140022378]
mov edx, 0x4d8
mov rcx, rdi
call fcn.140017cf4
jmp 0x140017a40
mov qword [rdi + 0x40], rsi
jmp 0x140017a40
lea rdx, [0x140028f28]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsicmp]
xor ebx, ebx
test eax, eax
jne 0x140017a2e
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop
lea rdx, [0x140022b78]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.1400160e0
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 0x140017a1c
mov rdx, rsi
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop
lea rdx, [rsp + 0x60]
lea rcx, [0x140038c18]
call qword [sym.imp.MFC42u.dll_AfxDaoGetEngine]
xor r9d, r9d
lea r8, [0x140015640]
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 0x140017a1c
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 0x140017830
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 0x14001777c
mov word [rbp + 0x1e6], si
cmp dword [rsp + 0x4c], ebx
jne 0x140017748
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_AfxDeleteObject]
jmp 0x140017825
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 0x140017482
mov ebx, 2
cmp eax, ebx
jne 0x140017825
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 0x140017825
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.140015de8
xor eax, eax
lea rcx, [rbp - 0x60]
cmp qword [rbp - 0x58], rax
je 0x140017967
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, [0x140028fc4]
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.1400172ac
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 0x140017b60
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.1400156e4
mov rdx, qword [rsp + 0x58]
mov r8d, dword [rdx - 8]
xor r9d, r9d
test r8d, r8d
je 0x140017a05
sub r8d, 1
je 0x140017a05
movsxd rax, r8d
test rax, rax
js 0x1400179bb
cmp r8d, dword [rdx - 8]
jge 0x1400179bb
movzx ecx, word [rdx + rax*2]
jmp 0x1400179be
mov ecx, r9d
cmp cx, 0x2e
je 0x1400179d1
mov ecx, 1
sub r8d, ecx
sub rax, rcx
jne 0x1400179aa
test r8d, r8d
je 0x140017a05
inc r8d
mov rcx, rdi
call fcn.1400172ac
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 0x140017b59
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.140017cf4
jmp 0x14001776c
mov edx, 0x166
mov rcx, rdi
call fcn.140017cf4
mov ebx, 0x80004005
test ebx, ebx
js 0x140017b60
jmp 0x140017a4e
mov ebx, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140017a6f
cmp rcx, qword [rdi + 0x40]
je 0x140017a6f
mov rax, qword [rcx]
mov edx, 1
mov rax, qword [rax]
call qword [0x140022378]
mov rdx, qword [rdi + 0x40]
mov rcx, rdi
call fcn.1400187f0
jmp 0x140017b60
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 0x140017b26
mov ecx, 0x802
call fcn.14001c78c
mov rsi, rax
xor eax, eax
test rsi, rsi
je 0x140017b02
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x400
mov r9, rsi
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.140017c28
lea rdx, [0x140028f04]
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 0x140017b2b
mov ebx, 2
mov rdx, qword [rsp + 0x50]
cmp dword [rdx - 8], esi
je 0x140017b48
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.14001cbc0
mov rbx, qword [rsp + 0x378]
add rsp, 0x340
pop rdi
pop rsi
pop rbp
ret