Function at 0x401000
Capabilities:
Create process on windows
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0x374
push ebx
push ebp
mov ebp, ecx
push esi
test ebp, ebp
push edi
mov dword [esp + 0x1c], edx
je 0x401271
push 0x3a
push ebp
call fcn.00403530
mov edx, eax
add esp, 8
test edx, edx
je 0x401271
cmp edx, ebp
je 0x401271
mov al, byte [edx + 1]
test al, al
je 0x401271
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + edx + 0x78]
mov ecx, 5
sub edi, ebp
mov esi, 0x40c1d0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x78]
push ecx
push 0x20019
push 0
push edx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [esp + 0x10], eax
je 0x401271
lea eax, [esp + 0x18]
lea ecx, [esp + 0x17c]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x24]
push ecx
push edx
push 0
push 0x40f760
push eax
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
mov ecx, dword [esp + 0x14]
neg ebx
sbb ebx, ebx
push ecx
inc ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x401271
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401148
mov eax, dword [esp + 0x20]
cmp eax, 1
jne 0x401121
lea edi, [esp + 0x17c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40114a
cmp eax, 2
jne 0x401148
lea ecx, [esp + 0x78]
push 0x104
lea edx, [esp + 0x180]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebx, eax
cmp ebx, 0x104
jbe 0x40114a
xor ebx, ebx
test ebx, ebx
je 0x401271
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40116a
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x374
ret
mov al, byte [esp + 0x78]
mov dword [esp + 0x10], 0
test al, al
lea ebx, [esp + 0x78]
lea edx, [esp + 0x17c]
je 0x4011e4
mov al, byte [ebx]
cmp al, 0x25
je 0x401191
mov byte [edx], al
inc edx
inc ebx
jmp 0x4011df
mov al, byte [ebx + 1]
cmp al, 0x31
jne 0x4011ce
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0x18], 1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00403530
add esp, 8
mov edx, eax
jmp 0x4011dc
cmp al, 0x25
jne 0x4011d5
mov byte [edx], al
inc edx
mov al, byte [ebx + 1]
test al, al
je 0x4011e4
add ebx, 2
cmp byte [ebx], 0
jne 0x401185
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4011f1
mov byte [edx], 0
jmp 0x401214
mov byte [edx], 0x20
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
inc edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x34]
lea edx, [esp + 0x34]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], 0x44
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x19c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x401271
mov ecx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x374
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x374
ret