Function at 0x421f70
Capabilities:
Create process on windows
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x42d008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x40], eax
mov ebx, ecx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x20]
push ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x24], eax
call dword [sym.imp.mozglue.dll__wcsdup]
pop ecx
mov ecx, dword [ebx + 0x2c]
mov dword [ebx + 0x2c], eax
test ecx, ecx
je 0x421fc0
push ecx
call dword [sym.imp.mozglue.dll_free]
pop ecx
push esi
call dword [sym.imp.mozglue.dll__wcsdup]
mov esi, eax
mov edi, 0x8040c
mov eax, dword [ebp - 0x40]
pop ecx
mov ecx, 0x40c
cmp dword [eax + 0x44], 0
cmove edi, ecx
cmp dword [ebx + 0x1c], 0
mov dword [ebp - 0x38], edi
je 0x421ffe
call fcn.0040e965
mov dword [ebp - 0x38], edi
cmp dword [eax], 5
jge 0x421ffe
mov eax, edi
or eax, 0x1000000
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push dword [ebp - 0x44]
mov edi, eax
lea ecx, [ebp - 0x20]
mov edx, edi
call fcn.0040b501
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
cmp dword [ebp - 0xc], 8
lea ecx, [ebp - 0x20]
lea edi, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x20]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x40]
movzx eax, byte [ebp + 0x10]
xor edi, edi
push edi
push ecx
push dword [ebp - 0x38]
push eax
push edi
push edi
push esi
push dword [ebp - 0x3c]
push dword [ebx + 0x10]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x422068
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
push 0x12
pop edi
mov dword [ecx], eax
jmp 0x422187
lea eax, [ebp - 0x58]
mov dword [ebp - 0x34], edi
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
call fcn.0040e4dd
cmp dword [ebx + 0x1c], edi
je 0x4220b1
push dword [ebp - 0x34]
push dword [ebx + 0x1c]
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x4220b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
push edi
push dword [ebp - 0x34]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x14
jmp 0x422146
lea edi, [ebx + 0x14]
cmp dword [edi], 0
je 0x4220f5
cmp dword [edi], 0xffffffff
je 0x4220f5
mov eax, dword [ebp - 0x30]
push dword [edi]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x4220ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
push 0
push dword [ebp - 0x34]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x15
jmp 0x422146
mov ecx, edi
call fcn.004016c0
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x34]
push eax
call fcn.0040e485
test al, al
jne 0x42211f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
push 0
push dword [ebp - 0x34]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x17
jmp 0x422146
mov ecx, dword [ebp - 0x34]
call fcn.00422d4e
mov dword [ebx + 0x28], eax
test eax, eax
jne 0x422149
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x24]
push 0
push dword [ebp - 0x34]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x2b
pop edi
jmp 0x42215f
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x34]
call fcn.0040e580
push eax
mov ecx, ebx
call fcn.0040e4dd
xor edi, edi
lea ecx, [ebp - 0x34]
call fcn.004016c0
lea ecx, [ebp - 0x30]
call fcn.004016c0
and dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x30]
and dword [ebp - 0x28], 0
call fcn.004016c0
lea ecx, [ebp - 0x34]
call fcn.004016c0
lea ecx, [ebp - 0x20]
call fcn.00404770
test esi, esi
je 0x42219b
push esi
call dword [sym.imp.mozglue.dll_free]
pop ecx
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405160
mov esp, ebp
pop ebp
ret 0x1c