Function at 0x401eb8
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x938
lea eax, [ebp - 4]
push eax
push str.SystemCurrentControlSetServices
push CreateStatusWindowA
call fcn.00409d52
add esp, 0xc
test eax, eax
jne 0x402135
push ebx
xor ebx, ebx
push 0x3ff
lea eax, [ebp - 0x937]
push ebx
push eax
mov byte [ebp - 0x938], bl
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x938]
push eax
push ebx
push dword [ebp - 4]
mov dword [ebp - 0x10], ebx
call fcn.00409d98
add esp, 0x18
test eax, eax
jne 0x40212b
push esi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x938]
push eax
push dword [ebp - 4]
call fcn.00409d52
add esp, 0xc
test eax, eax
jne 0x402109
mov edi, 0x104
push edi
lea eax, [ebp - 0x21f]
push ebx
push eax
mov byte [ebp - 0x220], bl
call sub.msvcrt.dll_memset
push 0xff
lea eax, [ebp - 0x117]
push ebx
push eax
mov byte [ebp - 0x118], bl
call sub.msvcrt.dll_memset
push str.ImagePath
push dword [ebp - 0xc]
mov eax, edi
lea esi, [ebp - 0x220]
call fcn.00409d6c
push str.DisplayName
push dword [ebp - 0xc]
lea eax, [edi - 5]
lea esi, [ebp - 0x118]
call fcn.00409d6c
add esp, 0x28
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x220], bl
je 0x402109
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2c], ebx
mov dword [ebp - 8], ebx
jle 0x402109
push dword [ebp - 8]
mov esi, dword [ebp + 8]
call fcn.004054a9
mov esi, eax
lea ecx, [esi + 0x11c]
mov dword [ebp - 0x14], esi
call fcn.00403b72
push eax
lea ecx, [ebp - 0x220]
call fcn.00403b72
push eax
call sub.msvcrt.dll__stricmp
test eax, eax
pop ecx
pop ecx
jne 0x4020f7
cmp byte [ebp - 0x118], 0x40
jne 0x4020c7
push edi
lea eax, [ebp - 0x327]
push ebx
push eax
mov byte [ebp - 0x328], bl
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x537]
push ebx
push eax
mov byte [ebp - 0x538], bl
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x42f]
push ebx
push eax
mov byte [ebp - 0x430], bl
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x117]
mov dword [ebp - 0x18], ebx
call fcn.00404253
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x538]
push eax
lea eax, [ebp - 0x117]
call fcn.00404253
add esp, 0x34
push edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
lea eax, [ebp - 0x538]
push eax
call sub.msvcrt.dll_atoi
pop ecx
push 2
mov edi, eax
push ebx
lea eax, [ebp - 0x430]
push eax
neg edi
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExA]
mov esi, eax
cmp esi, ebx
je 0x4020c4
push 0xff
lea eax, [ebp - 0x118]
push eax
push edi
push esi
call dword [sym.imp.USER32.dll_LoadStringA]
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x118]
push eax
lea edi, [esi + 0x621]
mov ebx, 0xff
call fcn.00403a2c
lea eax, [ebp - 0x938]
push eax
lea edi, [esi + 0x721]
call fcn.00403a2c
pop ecx
lea edi, [ebx + 5]
pop ecx
xor ebx, ebx
inc dword [ebp - 8]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 0x2c]
jl 0x401fbb
inc dword [ebp - 0x10]
lea eax, [ebp - 0x938]
push eax
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.00409d98
add esp, 0xc
test eax, eax
je 0x401f1a
pop edi
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
leave
ret 4