Function at 0x1008295
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x1026bcc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
mov dword [ebp - 0x224], edi
call sub.MFC42u.dll_AfxGetModuleState
mov esi, dword [eax + 8]
xor eax, eax
push 0x21a
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp esi, edi
jne 0x1008328
mov eax, dword [section..data]
cmp eax, section..data
je 0x10085d5
test dword [eax + 0x1c], 0x400
je 0x10085d5
cmp byte [eax + 0x19], 5
jb 0x10085d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001ca0
push 0x1b
mov eax, dword [section..data]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100701e
jmp 0x10085d5
push 0x104
lea eax, [ebp - 0x220]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1008376
mov eax, dword [section..data]
cmp eax, section..data
je 0x10085d5
test dword [eax + 0x1c], 0x400
je 0x10085d5
cmp byte [eax + 0x19], 5
jb 0x10085d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001ca0
push 0x1c
jmp 0x1008313
push 0x1002124
push 0x10e
lea eax, [ebp - 0x220]
push eax
call fcn.01007feb
cmp eax, edi
jge 0x10083d1
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x10085d5
test dword [ecx + 0x1c], 0x400
je 0x10085d5
cmp byte [ecx + 0x19], 5
jb 0x10085d5
push eax
push 0x1001ca0
push 0x1d
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100701e
jmp 0x10085d5
push ebx
lea eax, [ebp - 0x224]
push eax
mov ebx, 0x2001f
push ebx
push edi
mov edi, 0x10020b0
push edi
mov esi, 0x80000001
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1008503
lea eax, [ebp - 0x228]
push eax
xor edi, edi
push edi
lea eax, [ebp - 0x22c]
push eax
push edi
mov esi, 0x1002088
push esi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100849a
cmp dword [ebp - 0x228], edi
jne 0x10085bf
lea eax, [ebp - 0x220]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x1008437
sub eax, edx
sar eax, 1
inc eax
push eax
lea eax, [ebp - 0x220]
push eax
push 1
push edi
push esi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10085bf
mov eax, dword [section..data]
cmp eax, section..data
je 0x10085bf
test dword [eax + 0x1c], 0x400
je 0x10085bf
cmp byte [eax + 0x19], 5
jb 0x10085bf
push esi
push 0x1001ca0
push 0x1e
jmp 0x1008582
lea eax, [ebp - 0x220]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x10084a3
sub eax, edx
sar eax, 1
inc eax
push eax
lea eax, [ebp - 0x220]
push eax
push 1
push edi
push esi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10085bf
mov eax, dword [section..data]
cmp eax, section..data
je 0x10085bf
test dword [eax + 0x1c], 0x400
je 0x10085bf
cmp byte [eax + 0x19], 5
jb 0x10085bf
push esi
push 0x1001ca0
push 0x1f
jmp 0x1008582
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x224]
push eax
xor eax, eax
push eax
push ebx
push eax
push eax
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x100858f
lea eax, [ebp - 0x220]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100852d
sub eax, edx
sar eax, 1
inc eax
push eax
lea eax, [ebp - 0x220]
push eax
push 1
push 0
push 0x1002088
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [section..data]
cmp eax, section..data
je 0x10085bf
test dword [eax + 0x1c], 0x400
je 0x10085bf
cmp byte [eax + 0x19], 5
jb 0x10085bf
lea ecx, [ebp - 0x220]
push ecx
push 0x1001ca0
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100704a
jmp 0x10085bf
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x10085bf
test dword [ecx + 0x1c], 0x400
je 0x10085bf
cmp byte [ecx + 0x19], 5
jb 0x10085bf
push eax
push 0x1001ca0
push 0x21
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100701e
cmp dword [ebp - 0x224], 0
pop ebx
je 0x10085d5
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0101d7d3
leave
ret