Function at 0x30005743
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 [0x300014c8]
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 0x300017d0
push eax
call fcn.300056f2
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 0x30001200
push 0x80000000
mov word [ebp - 0x394], bx
mov dword [ebp - 0x6ac], ebx
call esi
test eax, eax
jne 0x3000590a
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 0x300058f6
lea eax, [ebp - 0x6b0]
push eax
lea eax, [ebp - 0x6b4]
push eax
push ebx
push ebx
push 0x300017b8
push dword [ebp - 0x6a4]
mov dword [ebp - 0x6b0], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x3000588c
cmp dword [ebp - 0x6b0], 4
jne 0x3000588c
cmp dword [ebp - 0x6b4], 1
jne 0x30005875
cmp dword [ebp - 0x6a4], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x3000585e
push dword [ebp - 0x6a4]
call esi
cmp dword [ebp - 0x6ac], ebx
je 0x3000586e
push dword [ebp - 0x6ac]
call esi
xor al, al
jmp 0x30005bb3
cmp dword [ebp - 0x6b4], 2
jne 0x3000588c
mov eax, dword [ebp - 0x6b8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x30005848
lea eax, [ebp - 0x6a8]
push eax
push edi
push ebx
push 0x30001798
push dword [ebp - 0x6a4]
mov dword [ebp - 0x6a8], ebx
call esi
test eax, eax
jne 0x300058e2
lea eax, [ebp - 0x6b0]
push eax
lea eax, [ebp - 0x394]
push eax
push ebx
push ebx
push 0x30001364
push dword [ebp - 0x6a8]
mov dword [ebp - 0x6b0], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x300058e2
mov word [ebp - 0x394], bx
cmp dword [ebp - 0x6a8], ebx
je 0x300058f6
push dword [ebp - 0x6a8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x6a4], ebx
je 0x3000590a
push dword [ebp - 0x6a4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x6ac], ebx
je 0x3000591e
push dword [ebp - 0x6ac]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x394], bx
je 0x30005a0f
push 0x30001780
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x30001768
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 0x30005a29
push 0x30001754
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 0x300059fd
push 0x30001744
push dword [ebp - 0x6b0]
call esi
lea ecx, [ebp - 0x6b0]
push ecx
lea ecx, [ebp - 0x6b8]
push ecx
push 0x30001740
push dword [ebp - 0x6a8]
call eax
test eax, eax
je 0x300059fd
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 0x30001728
push eax
call fcn.3000570c
add esp, 0x18
push dword [ebp - 0x6a8]
push ebx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x30005a29
push 0x30001714
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 0x30005a43
push 0x30001714
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 0x30005bb1
lea eax, [ebp - 0x498]
push eax
push ebx
push 0x30001710
lea eax, [ebp - 0x18c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x30005bb1
push esi
lea eax, [ebp - 0x18c]
push eax
call fcn.30005694
test al, al
je 0x30005bb1
push 0x3000170c
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 0x30005bb1
lea eax, [ebp - 0x394]
push 0x5c
push eax
call dword [sym.imp.MSVCR80.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
jne 0x30005b0d
lea eax, [ebp - 0x394]
jmp 0x30005b0f
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 0x30001558
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 0x3000154c
push eax
call fcn.30005726
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 0x30005bb1
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.30005687
leave
ret 4