Function at 0x300696e2
Capabilities:
Create process on windows
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x710
mov eax, dword [0x3002223c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x6b8], ecx
movzx ecx, byte [eax + 0xf]
push edi
push ecx
movzx ecx, byte [eax + 0xe]
push ecx
movzx ecx, byte [eax + 0xd]
push ecx
movzx ecx, byte [eax + 0xc]
push ecx
movzx ecx, byte [eax + 0xb]
push ecx
movzx ecx, byte [eax + 0xa]
push ecx
movzx ecx, byte [eax + 9]
push ecx
movzx ecx, byte [eax + 8]
push ecx
movzx ecx, word [eax + 6]
push ecx
movzx ecx, word [eax + 4]
push ecx
push dword [eax]
lea eax, [ebp - 0x88]
push 0x300224a0
push eax
call fcn.30069691
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0x34
lea eax, [ebp - 0x6ac]
push eax
xor ebx, ebx
mov edi, 0x20019
push edi
push ebx
push 0x30022490
push SysReAllocString
mov word [ebp - 0x394], bx
mov dword [ebp - 0x6ac], ebx
call esi
test eax, eax
jne 0x300698a9
lea eax, [ebp - 0x6a4]
push eax
push edi
push ebx
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x6ac]
mov dword [ebp - 0x6a4], ebx
call esi
test eax, eax
jne 0x30069895
lea eax, [ebp - 0x6b0]
push eax
lea eax, [ebp - 0x6b4]
push eax
push ebx
push ebx
push 0x30022478
push dword [ebp - 0x6a4]
mov dword [ebp - 0x6b0], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x3006982b
cmp dword [ebp - 0x6b0], 4
jne 0x3006982b
cmp dword [ebp - 0x6b4], 1
jne 0x30069814
cmp dword [ebp - 0x6a4], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x300697fd
push dword [ebp - 0x6a4]
call esi
cmp dword [ebp - 0x6ac], ebx
je 0x3006980d
push dword [ebp - 0x6ac]
call esi
xor al, al
jmp 0x30069b52
cmp dword [ebp - 0x6b4], 2
jne 0x3006982b
mov eax, dword [ebp - 0x6b8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x300697e7
lea eax, [ebp - 0x6a8]
push eax
push edi
push ebx
push 0x30022458
push dword [ebp - 0x6a4]
mov dword [ebp - 0x6a8], ebx
call esi
test eax, eax
jne 0x30069881
lea eax, [ebp - 0x6b0]
push eax
lea eax, [ebp - 0x394]
push eax
push ebx
push ebx
push 0x300049c8
push dword [ebp - 0x6a8]
mov dword [ebp - 0x6b0], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x30069881
mov word [ebp - 0x394], bx
cmp dword [ebp - 0x6a8], ebx
je 0x30069895
push dword [ebp - 0x6a8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x6a4], ebx
je 0x300698a9
push dword [ebp - 0x6a4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x6ac], ebx
je 0x300698bd
push dword [ebp - 0x6ac]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x394], bx
je 0x300699ae
push 0x30022440
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x300095f8
push eax
mov dword [ebp - 0x6b0], eax
call esi
lea ecx, [ebp - 0x6b4]
push ecx
lea ecx, [ebp - 0x394]
push ecx
call eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push ebx
mov dword [ebp - 0x6b4], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp - 0x6a8], eax
je 0x300699c8
push 0x30009610
push dword [ebp - 0x6b0]
call esi
push dword [ebp - 0x6a8]
lea ecx, [ebp - 0x394]
push dword [ebp - 0x6b4]
push ebx
push ecx
call eax
test eax, eax
je 0x3006999c
push 0x300095e8
push dword [ebp - 0x6b0]
call esi
lea ecx, [ebp - 0x6b0]
push ecx
lea ecx, [ebp - 0x6b8]
push ecx
push 0x30003940
push dword [ebp - 0x6a8]
call eax
test eax, eax
je 0x3006999c
mov eax, dword [ebp - 0x6b8]
movzx ecx, word [eax + 0xc]
push ecx
movzx ecx, word [eax + 0xe]
push ecx
movzx ecx, word [eax + 8]
movzx eax, word [eax + 0xa]
push ecx
push eax
lea eax, [ebp - 0x38]
push 0x30005144
push eax
call fcn.300696ab
add esp, 0x18
push dword [ebp - 0x6a8]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x300699c8
push 0x3002242c
lea eax, [ebp - 0x394]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
cmp word [ebp - 0x38], bx
jne 0x300699e2
push 0x3002242c
lea eax, [ebp - 0x38]
push 0x19
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x6cc], ebx
lea edi, [ebp - 0x6c8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x40
stosd dword es:[edi], eax
lea eax, [ebp - 0x70c]
push ebx
push eax
mov dword [ebp - 0x710], 0x44
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18c]
push eax
mov esi, 0x104
push esi
mov dword [ebp - 0x6e4], 0x80
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x30069b50
lea eax, [ebp - 0x498]
push eax
push ebx
push 0x30022428
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x30069b50
push esi
lea eax, [ebp - 0x18c]
push eax
call fcn.30069633
test al, al
je 0x30069b50
push 0x30022424
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x6bc]
push eax
call dword [sym.imp.MSVCR80.dll_fopen_s]
add esp, 0xc
test eax, eax
jne 0x30069b50
lea eax, [ebp - 0x394]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
jne 0x30069aac
lea eax, [ebp - 0x394]
jmp 0x30069aae
inc eax
inc eax
lea ecx, [ebp - 0x498]
push ecx
push 1
push 1
lea ecx, [ebp - 0x88]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
push 0x20000
push 0x30022270
push dword [ebp - 0x6bc]
call dword [sym.imp.MSVCR80.dll_fwprintf_s]
push dword [ebp - 0x6bc]
call dword [sym.imp.MSVCR80.dll_fclose]
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x18c]
push eax
lea eax, [ebp - 0x6a0]
push 0x30022264
push eax
call fcn.300696c5
add esp, 0x38
lea eax, [ebp - 0x6cc]
push eax
lea eax, [ebp - 0x710]
push eax
push ebx
push ebx
push 0x4000020
push 1
push ebx
push ebx
lea eax, [ebp - 0x6a0]
push eax
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x30069b50
push dword [ebp - 0x6c8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x6cc]
call esi
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.3006961b
leave
ret 4