Function at 0x401580
Capabilities:
Create directory
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x46c
lea eax, [esp + 4]
push ebx
push esi
push eax
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsCEAPPMGR.EXE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4013c2
lea ecx, [esp + 0x10]
lea edx, [esp + 0x370]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x1c]
push 0x4031b8
push eax
mov dword [esp + 0x28], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4013c2
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x370]
lea eax, [esp + 0x14]
push edx
push eax
call ebx
mov cl, byte [esp + 0x14]
xor edx, edx
test cl, cl
lea eax, [esp + 0x14]
je 0x4013c2
cmp cl, 0x5c
jne 0x4013b6
lea edx, [eax + 1]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4013ae
test edx, edx
jne 0x4013df
push 0
push str.Setup
push str.Windows_CE_Services_not_found_on_this_computer._Setup_cannot_continue_and_will_now_exit.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
add esp, 0x46c
ret
lea ecx, [esp + 0x118]
push 0x50
push ecx
push 2
push 0x67
mov byte [edx], 0
mov byte [esp + 0x128], 0
call fcn.004011b0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 0x10
lea edx, [esp + 0x118]
lea eax, [esp + 0x14]
push edx
push eax
call esi
lea ecx, [esp + 0x14]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401450
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401450
lea edx, [esp + 0x14]
push 0
push edx
push str.Could_not_create_install_directory._Setup_cannot_continue_and_will_exit.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
add esp, 0x46c
ret
lea eax, [esp + 8]
push edi
lea ecx, [esp + 0x18]
mov edi, 1
push eax
push ecx
push edi
call fcn.00401220
add esp, 0xc
test eax, eax
je 0x401485
lea edx, [esp + 0xc]
lea eax, [esp + 0x18]
inc edi
push edx
push eax
push edi
call fcn.00401220
add esp, 0xc
test eax, eax
jne 0x40146d
mov eax, dword [esp + 0xc]
pop edi
test eax, eax
je 0x4014ab
lea ecx, [esp + 0x14]
push 0
push ecx
push str.An_error_occured_writing_your_Windows_CE_application_to_disk._Setup_cannot_continue_and_will_exit.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
add esp, 0x46c
ret
lea edx, [esp + 0x168]
push 0x403058
push edx
call ebx
lea eax, [esp + 0x14]
lea ecx, [esp + 0x168]
push eax
push ecx
call esi
lea edx, [esp + 0x168]
push section..data
push edx
call esi
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, 0x104
lea edx, [esp + eax + 0x168]
sub ecx, eax
push ecx
push edx
push 1
push 0x65
call fcn.004011b0
add esp, 0x10
test al, al
jne 0x401523
push 0
push str.Setup
push str.The_setup_files_are_missing_information._Setup_cannot_continue_and_will_exit.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
pop ebx
add esp, 0x46c
ret
lea eax, [esp + 0x168]
push 0x403058
push eax
call esi
lea ecx, [esp + 0x370]
lea edx, [esp + 0x26c]
push ecx
push edx
call ebx
lea eax, [esp + 0x26c]
push 0x403004
push eax
call esi
lea ecx, [esp + 0x168]
lea edx, [esp + 0x26c]
push ecx
push edx
call esi
lea eax, [esp + 0x26c]
push 5
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop esi
pop ebx
add esp, 0x46c
ret
call fcn.004010b0
test eax, eax
je 0x401597
call fcn.00401150
test eax, eax
je 0x401597
jmp 0x401330
ret