Function at 0x10087970
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100b80b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x46c
push ebx
push esi
push edi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], esp
mov ebx, ecx
push eax
push 0x20019
lea edi, [ebx + 0x110]
push 0
push str.SOFTWAREOpen_Executive_4Debug
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x34], ebx
mov dword [ebx + 4], 0
mov byte [ebx + 8], 0
mov byte [edi], 0
mov byte [ebx + 0x214], 0
mov byte [ebx + 0x318], 0
mov dword [ebx + 0x41c], 8
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10087b3b
mov eax, 4
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x14]
lea eax, [ebx + 4]
push ecx
lea edx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push edx
push 0
push str.DebugMode
push eax
call esi
test eax, eax
je 0x10087a1d
mov dword [ebx + 4], 0
test dword [ebx + 4], 0x40001
je 0x10087a8a
lea ecx, [ebp - 0x14]
lea eax, [ebx + 8]
push ecx
lea edx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push edx
push 0
push str.DebugFile
push eax
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0x18], 1
call esi
test eax, eax
je 0x10087a55
mov byte [ebx + 8], 0
mov eax, 4
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebx + 0x41c]
push ecx
lea edx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push edx
push 0
push str.DebugFileBlockSize
push eax
call esi
test eax, eax
je 0x10087a8a
mov dword [ebx + 0x41c], 8
test byte [ebx + 4], 4
je 0x10087abb
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x18]
push edi
push edx
push 0
push str.DebugFileOlap
push eax
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0x18], 1
call esi
test eax, eax
je 0x10087abb
mov byte [edi], 0
test byte [ebx + 4], 8
je 0x10087af6
lea ecx, [ebp - 0x14]
lea eax, [ebx + 0x214]
push ecx
lea edx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push edx
push 0
push str.DebugFileOEWS
push eax
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0x18], 1
call esi
test eax, eax
je 0x10087af6
mov byte [ebx + 0x214], 0
test byte [ebx + 4], 0x10
je 0x10087b31
lea ecx, [ebp - 0x14]
lea eax, [ebx + 0x318]
push ecx
lea edx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push edx
push 0
push str.DebugFileDriven
push eax
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0x18], 1
call esi
test eax, eax
je 0x10087b31
mov byte [ebx + 0x318], 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x178]
xor esi, esi
push edx
push esi
push esi
push 0x1a
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jl 0x10088208
push 0x104
lea eax, [ebp - 0x178]
push str.cegidbi.config
push eax
call dword [sym.imp.MSVCRT.dll_strncat]
lea ecx, [ebp - 0x178]
push 4
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x14
test eax, eax
jne 0x10088208
push 0x17
push esi
push 0x100e0dc0
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], esi
mov dword [ebp - 0x24], esi
call fcn.1001e310
cmp eax, esi
jge 0x10087baf
cmp eax, 0x80004002
je 0x10087baf
push eax
call fcn.100af593
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 1
cmp eax, esi
jne 0x10087bc7
push 0x80004003
call fcn.100af593
mov eax, dword [ebp - 0x24]
mov edx, dword [eax]
push esi
push eax
call dword [edx + 0xfc]
lea eax, [ebp - 0x178]
mov word [ebp - 0x70], 8
push eax
call fcn.100af44e
cmp eax, esi
mov dword [ebp - 0x68], eax
jne 0x10087bfe
lea ecx, [ebp - 0x178]
test ecx, ecx
je 0x10087bfe
push 0x8007000e
call fcn.100af593
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 2
cmp eax, esi
jne 0x10087c16
push 0x80004003
call fcn.100af593
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x70]
lea ecx, [ebp - 0x12]
push ecx
mov edx, dword [eax]
sub esp, 0x10
mov esi, eax
mov ecx, esp
push eax
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x6c]
mov dword [ecx + 4], ebx
mov ebx, dword [ebp - 0x68]
mov dword [ecx + 8], ebx
mov ebx, dword [ebp - 0x64]
mov dword [ecx + 0xc], ebx
call dword [edx + 0xe8]
test eax, eax
jge 0x10087c51
push 0x100e0dd0
push esi
push eax
call fcn.100af5a1
cmp word [ebp - 0x12], 0xffff
lea edx, [ebp - 0x70]
push edx
mov byte [ebp - 4], 1
sete bl
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jge 0x10087c71
push eax
call fcn.100af593
test bl, bl
je 0x100881ed
mov eax, dword [ebp - 0x24]
push str.config
lea ecx, [ebp - 0x48]
push eax
push ecx
call fcn.100a88f0
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 3
mov dword [ebp - 0x30], ecx
mov edx, dword [eax]
test edx, edx
je 0x10087cba
push eax
lea ecx, [ebp - 0x30]
call fcn.1001e540
test eax, eax
jge 0x10087cb7
cmp eax, 0x80004002
je 0x10087cb7
push eax
call fcn.100af593
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x48]
mov byte [ebp - 4], 5
test eax, eax
je 0x10087cce
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x100881df
push str.debug
lea eax, [ebp - 0x5c]
push ecx
push eax
call fcn.100a88f0
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 6
mov dword [ebp - 0x18], ecx
mov edx, dword [eax]
test edx, edx
je 0x10087d14
push eax
lea ecx, [ebp - 0x18]
call fcn.1001e540
test eax, eax
jge 0x10087d11
cmp eax, 0x80004002
je 0x10087d11
push eax
call fcn.100af593
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x5c]
mov byte [ebp - 4], 8
test eax, eax
je 0x10087d28
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100881ce
push str.oledb
lea edx, [ebp - 0x50]
push ecx
push edx
call fcn.100a88f0
add esp, 0xc
mov dword [ebp - 0x40], 0
mov ecx, dword [eax]
test ecx, ecx
mov byte [ebp - 4], 9
je 0x10087d6d
push eax
lea ecx, [ebp - 0x40]
call fcn.1001e540
test eax, eax
jge 0x10087d6d
cmp eax, 0x80004002
je 0x10087d6d
push eax
call fcn.100af593
mov eax, dword [ebp - 0x50]
mov byte [ebp - 4], 0xb
test eax, eax
je 0x10087d7e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x10087daa
push 0
push 0
push 1
push str._log
push eax
call fcn.100a7750
mov esi, dword [ebp - 0x34]
add esp, 0x14
test eax, eax
je 0x10087dad
mov eax, dword [esi + 4]
or al, 1
mov dword [esi + 4], eax
jmp 0x10087dad
mov esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x18]
push str.olap
lea eax, [ebp - 0x60]
push edx
push eax
call fcn.100a88f0
add esp, 0xc
xor ebx, ebx
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x28], ebx
mov ecx, dword [eax]
cmp ecx, ebx
je 0x10087deb
push eax
lea ecx, [ebp - 0x28]
call fcn.1001e540
cmp eax, ebx
jge 0x10087deb
cmp eax, 0x80004002
je 0x10087deb
push eax
call fcn.100af593
mov eax, dword [ebp - 0x60]
mov byte [ebp - 4], 0xe
cmp eax, ebx
je 0x10087dfc
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x10087ec5
push ebx
push ebx
push 1
push str._log
push eax
call fcn.100a7750
add esp, 0x14
cmp eax, ebx
je 0x10087e3d
mov edx, dword [esi + 4]
push 0x104
or edx, 4
push edi
mov dword [esi + 4], edx
mov edx, dword [ebp - 0x28]
push str._file
push edx
call fcn.100a8590
add esp, 0x10
mov eax, dword [ebp - 0x28]
push str.addin
lea ecx, [ebp - 0x44]
push eax
push ecx
call fcn.100a88f0
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 0xf
mov dword [ebp - 0x1c], ecx
mov edx, dword [eax]
cmp edx, ebx
je 0x10087e7e
push eax
lea ecx, [ebp - 0x1c]
call fcn.1001e540
cmp eax, ebx
jge 0x10087e7b
cmp eax, 0x80004002
je 0x10087e7b
push eax
call fcn.100af593
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 0x11
cmp eax, ebx
je 0x10087e92
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x10087eb7
push ebx
push ebx
push 1
push str._log
push ecx
call fcn.100a7750
add esp, 0x14
cmp eax, ebx
je 0x10087eb4
mov eax, dword [esi + 4]
or al, 0x20
mov dword [esi + 4], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
mov byte [ebp - 4], 0xe
je 0x10087ec5
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x18]
push str.oews
lea edx, [ebp - 0x44]
push ecx
push edx
call fcn.100a88f0
add esp, 0xc
mov dword [ebp - 0x38], ebx
mov ecx, dword [eax]
cmp ecx, ebx
mov byte [ebp - 4], 0x12
je 0x10087f01
push eax
lea ecx, [ebp - 0x38]
call fcn.1001e540
cmp eax, ebx
jge 0x10087f01
cmp eax, 0x80004002
je 0x10087f01
push eax
call fcn.100af593
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 0x14
cmp eax, ebx
je 0x10087f12
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x10087f55
push ebx
push ebx
push 1
push str._log
push eax
call fcn.100a7750
add esp, 0x14
cmp eax, ebx
je 0x10087f55
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x38]
lea eax, [esi + 0x214]
push 0x104
push eax
or ecx, 8
push str._file
push edx
mov dword [esi + 4], ecx
call fcn.100a8590
add esp, 0x10
mov eax, dword [ebp - 0x18]
push str.driven
lea ecx, [ebp - 0x54]
push eax
push ecx
call fcn.100a88f0
add esp, 0xc
mov dword [ebp - 0x3c], ebx
mov ecx, dword [eax]
cmp ecx, ebx
mov byte [ebp - 4], 0x15
je 0x10087f91
push eax
lea ecx, [ebp - 0x3c]
call fcn.1001e540
cmp eax, ebx
jge 0x10087f91
cmp eax, 0x80004002
je 0x10087f91
push eax
call fcn.100af593
mov eax, dword [ebp - 0x54]
mov byte [ebp - 4], 0x17
cmp eax, ebx
je 0x10087fa2
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x10087fe5
push ebx
push ebx
push 1
push str._log
push eax
call fcn.100a7750
add esp, 0x14
cmp eax, ebx
je 0x10087fe5
mov ecx, dword [esi + 4]
lea eax, [esi + 0x318]
push 0x104
push eax
mov eax, dword [ebp - 0x3c]
or ecx, 0x10
push str._file
push eax
mov dword [esi + 4], ecx
call fcn.100a8590
add esp, 0x10
mov ecx, dword [ebp - 0x18]
push str.buffer
lea edx, [ebp - 0x58]
push ecx
push edx
call fcn.100a88f0
add esp, 0xc
mov dword [ebp - 0x2c], ebx
mov ecx, dword [eax]
cmp ecx, ebx
mov byte [ebp - 4], 0x18
je 0x10088021
push eax
lea ecx, [ebp - 0x2c]
call fcn.1001e540
cmp eax, ebx
jge 0x10088021
cmp eax, 0x80004002
je 0x10088021
push eax
call fcn.100af593
mov eax, dword [ebp - 0x58]
mov byte [ebp - 4], 0x1a
cmp eax, ebx
je 0x10088032
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
je 0x1008806f
push ebx
push ebx
push 1
push str._log
push eax
call fcn.100a7750
add esp, 0x14
cmp eax, ebx
je 0x1008806f
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x2c]
or ecx, 2
push str._blocksize
push edx
mov dword [esi + 4], ecx
call fcn.100a7c60
add esp, 8
mov dword [esi + 0x41c], eax
mov eax, dword [ebp - 0x18]
push str.output
lea ecx, [ebp - 0x4c]
push eax
push ecx
call fcn.100a88f0
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 0x1b
mov dword [ebp - 0x14], ecx
mov edx, dword [eax]
cmp edx, ebx
je 0x100880b0
push eax
lea ecx, [ebp - 0x14]
call fcn.1001e540
cmp eax, ebx
jge 0x100880ad
cmp eax, 0x80004002
je 0x100880ad
push eax
call fcn.100af593
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x4c]
mov bl, 0x1d
test eax, eax
mov byte [ebp - 4], bl
je 0x100880c5
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x10088168
push 0
push 0
push 1
push str._console
push ecx
call fcn.100a7750
add esp, 0x14
test eax, eax
je 0x100880ec
or dword [esi + 4], 0x10000
mov eax, dword [ebp - 0x14]
push 0
push 0
push 1
push str._msgbox
push eax
call fcn.100a7750
add esp, 0x14
test eax, eax
je 0x1008810e
or dword [esi + 4], 0x20000
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
push ecx
push str._file
push edx
mov byte [ebp - 4], 0x1e
call fcn.100a8250
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x1008815a
push 0x104
push eax
lea eax, [esi + 8]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov ecx, dword [esi + 4]
lea eax, [esi + 4]
add esp, 0xc
or ecx, 0x40000
mov dword [eax], ecx
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.100ae920
mov ecx, dword [ebp - 0x14]
test ecx, ecx
mov byte [ebp - 4], 0x1a
je 0x10088176
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 0x17
test eax, eax
je 0x10088187
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x3c]
mov byte [ebp - 4], 0x14
test eax, eax
je 0x10088198
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 0xe
test eax, eax
je 0x100881a9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 0xb
test eax, eax
je 0x100881ba
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x40]
mov byte [ebp - 4], 8
test eax, eax
je 0x100881cb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x18]
test ecx, ecx
mov byte [ebp - 4], 5
je 0x100881dc
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
mov byte [ebp - 4], 1
je 0x100881ed
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 0
test eax, eax
je 0x100881fe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
call fcn.100882d0
test eax, eax
je 0x10088278
lea edx, [ebp - 0x478]
lea eax, [ebp - 0x278]
push edx
lea ecx, [ebp - 0x378]
push eax
lea edx, [ebp - 0x14]
push ecx
push edx
mov ecx, ebx
call fcn.100882d0
push eax
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
lea eax, [ebp - 0x478]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [ebp - 0x278]
push eax
lea edx, [ebp - 0x378]
push ecx
lea eax, [ebp - 0x14]
push edx
push eax
add ebx, 0x10c
push str._s_s_s_P_ld_T_ld_s
push ebx
call sub.MFC42.DLL_CString::Format
add esp, 0x20
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret