Function at 0x106a987
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
sub esp, 0x1b0
mov eax, dword [0x1251b5c]
xor eax, dword [esp + 0x1b0]
push ebx
push ebp
mov dword [esp + 0x1b4], eax
mov eax, dword [esp + 0x1bc]
xor ebx, ebx
cmp eax, ebx
push esi
push edi
mov dword [esp + 0x10], ebx
je 0x106ae61
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push ebx
mov dword [eax], ebx
mov ebp, 0x1015a6c
lea eax, [esp + 0x58]
push ebp
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
jmp 0x106a9ee
inc dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x10]
lea eax, [esp + 0x58]
push ebp
push eax
call esi
add esp, 0xc
push ebx
push 1
push 3
push ebx
push 1
lea eax, [esp + 0x68]
push ebx
push eax
call edi
cmp eax, 0xffffffff
jne 0x106a9d7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x106aa32
call esi
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015a3c
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
add esp, 0xc
jmp 0x106ae61
mov edi, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
imul edi, edi, 0x130
push edi
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
jne 0x106aa6f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015a08
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
jmp 0x106ae52
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, 0x800
push eax
push ebx
mov dword [esp + 0x2c], eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
jne 0x106aaa7
push 0x10159ec
jmp 0x106ae10
cmp dword [esp + 0x10], ebx
mov eax, dword [esp + 0x1c4]
mov dword [eax], esi
mov dword [esp + 0x1c], ebx
jle 0x106adaa
push dword [esp + 0x1c]
lea eax, [esp + 0x58]
push 0x1015a6c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebx
push 1
push 3
push ebx
push 1
push 0x80000000
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x106add9
push ebx
lea ecx, [esp + 0x2c]
push ecx
push dword [esp + 0x2c]
push edi
push ebx
push ebx
push 0x7400c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x106aba6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x106ab6c
mov eax, dword [esp + 0x28]
push eax
push edi
push ebx
mov dword [esp + 0x30], eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp eax, ebx
je 0x106ae0b
push ebx
lea ecx, [esp + 0x2c]
push ecx
push dword [esp + 0x2c]
mov edi, eax
push eax
push ebx
push ebx
push 0x7400c
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x106ab1f
cmp dword [esp + 0x14], ebx
jne 0x106aba6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push eax
push 0x10159b0
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
cmp edi, ebx
je 0x106ad98
push edi
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
jmp 0x106ad98
cmp byte [esp + 0x1c8], bl
je 0x106abbe
push dword [edi]
push 0x101598c
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
mov dword [esi + 4], ebx
xor eax, eax
cmp dword [edi], ebx
jbe 0x106abd9
lea ecx, [edi + 0x1c]
cmp dword [ecx], ebx
je 0x106abd1
inc dword [esi + 4]
inc eax
add ecx, 0x20
cmp eax, dword [edi]
jb 0x106abca
mov eax, dword [esp + 0x1c]
push ebx
mov dword [esi], eax
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x2c]
mov dword [esi + 8], ebx
push edi
push ebx
push ebx
push 0x70000
push dword [esp + 0x34]
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x106ae23
mov eax, dword [edi + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [edi + 0x10]
mul dword [edi + 0xc]
push ebx
push dword [edi + 0x14]
push edx
push eax
call fcn.0105c6d0
push dword [edi + 4]
push dword [edi]
push edx
push eax
call fcn.0105c6d0
push ebx
mov dword [esi + 0x10], eax
lea eax, [esp + 0x24]
push eax
push 0x18
lea eax, [esp + 0x48]
push eax
push ebx
push ebx
push 0x740d4
push dword [esp + 0x34]
mov dword [esi + 0x14], edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x106ac6a
cmp byte [esp + 0x3e], bl
je 0x106ac6a
or dword [esi + 0x11c], 1
push ebx
lea eax, [esp + 0x24]
push eax
push 8
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push 0x41018
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x106ad88
movzx eax, byte [esp + 0x37]
push eax
movzx eax, byte [esp + 0x3a]
push eax
movzx eax, byte [esp + 0x3d]
push eax
movzx eax, byte [esp + 0x40]
push eax
lea eax, [esp + 0xc8]
push 0x1015938
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [esp + 0x2c]
push eax
push 0x20019
push ebx
lea eax, [esp + 0xc4]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x106ae43
mov dword [esp + 0x20], 0x104
push dword [esp + 0x20]
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x106ae43
lea ecx, [esp + 0x20]
push ecx
push eax
lea eax, [esp + 0x40]
push eax
push ebx
push 0x1015928
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, 0x80000005
jne 0x106ad4d
push dword [esp + 0x14]
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x20]
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x106acec
jmp 0x106ae43
cmp eax, ebx
jne 0x106ae43
push dword [esp + 0x14]
lea eax, [esi + 0x1c]
push 0x10023e4
push 0x100
push eax
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x10
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x14]
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x18]
add esi, 0x130
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x10]
jl 0x106aabe
push edi
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1bc]
xor ecx, dword [esp + 0x1c0]
pop edi
pop esi
pop ebp
pop ebx
call fcn.0105b9a4
add esp, 0x1b0
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push eax
push 0x10158f0
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x106ae43
push 0x10158a0
call dword [sym.imp.msvcrt.dll_printf]
jmp 0x106ae20
push 0x1015880
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
jmp 0x106ae43
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015858
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x106ae52
push edi
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, ebx
je 0x106ae61
push esi
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x106adb9