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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x2a0
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [0x646040]
xor eax, ebp
mov dword [esp + 0x298], eax
lea esi, [esp + 0x108]
push 0x190
push 0
push esi
call fcn.00568ad0
mov ecx, edi
add esp, 0xc
cmp byte [edi + 0xb], 0
mov eax, edi
jns 0x40f106
mov eax, dword [ecx]
mov dword [esp + 0xc], ecx
xor ecx, ecx
movzx edx, word [eax + ecx*2]
mov word [esp + ecx*2 + 0x108], dx
test dx, dx
je 0x40f130
inc ecx
cmp ecx, 0xc8
jne 0x40f10c
mov word [esp + 0x296], 0
push esi
call fcn.004ffdf0
add esp, 4
mov eax, dword [ebp + 0x10]
cmp byte [eax + 0x1d], 1
je 0x40f7e0
mov dword [esp + 0x20], 0xa
mov al, byte [0x64b456]
test al, al
jne 0x40f870
xor eax, eax
dec eax
lea edi, [esp + 0xe4]
mov dword [edi + 8], eax
mov dword [edi + 4], eax
mov dword [edi], eax
lea esi, [esp + 0x90]
push 0x103
push str.launch_win.cc
push str.LaunchProcess
push esi
call fcn.00509c60
add esp, 0x10
mov ecx, edi
push 0x64b6f0
push esi
call fcn.004478c0
pxor xmm0, xmm0
movdqa xmmword [esp + 0xf0], xmm0
movdqa xmmword [esi], xmm0
movdqu xmmword [esi + 0x3c], xmm0
movdqa xmmword [esi + 0x30], xmm0
movdqa xmmword [esi + 0x20], xmm0
movdqa xmmword [esi + 0x10], xmm0
mov dword [esi + 4], 0x48
mov dword [esp + 8], 0
mov esi, dword [ebp + 0x10]
cmp byte [esi + 0x4a], 1
mov ecx, 0
jne 0x40f1e8
call fcn.00536520
xor ecx, ecx
cmp eax, 0x10
setge cl
mov edx, dword [esi + 0x24]
xor eax, eax
cmp edx, dword [esi + 0x28]
setne al
add eax, ecx
je 0x40f214
lea ecx, [esp + 0x90]
push eax
call fcn.0042dcd0
mov dword [esp + 8], 0x80000
test al, al
je 0x40f765
cmp byte [esi + 0x4a], 1
jne 0x40f25e
call fcn.00536520
cmp eax, 0x10
jl 0x40f25e
or byte [esp + 0xfb], 0x20
mov eax, dword [esp + 0xd8]
test eax, eax
je 0x40f852
xor ecx, ecx
lea edx, [esp + 0xf0]
push ecx
push ecx
push 0x10
push edx
push 0x20007
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x40f852
cmp dword [esi + 0x20], 1
mov edi, dword [esi + 0x24]
sete cl
mov ebx, dword [esi + 0x28]
cmp edi, ebx
je 0x40f2d3
cmp ebx, edi
js 0x40f7c2
xor esi, esi
inc esi
push esi
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x40f780
add edi, 4
cmp edi, ebx
jne 0x40f27a
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
sub ecx, eax
je 0x40f521
mov edx, dword [esp + 0xd8]
test edx, edx
je 0x40f599
xor esi, esi
push esi
push esi
push ecx
push eax
push 0x20002
push esi
mov esi, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
mov cl, 1
test eax, eax
je 0x40f599
cmp byte [esi + 0x1e], 1
je 0x40f57c
mov byte [esp + 7], cl
cmp byte [esi + 0x34], 1
je 0x40f589
mov eax, dword [esp + 0xc0]
mov ecx, eax
or ecx, 1
mov dword [esp + 0xc0], ecx
movzx ecx, byte [esi + 0x1c]
xor ecx, 1
mov word [esp + 0xc4], cx
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x40]
mov esi, dword [esi + 0x44]
test ecx, ecx
jne 0x40f530
test edx, edx
jne 0x40f530
test esi, esi
jne 0x40f530
mov esi, dword [ebp + 0x10]
cmp dword [esi + 0x38], 0
jne 0x40f364
mov edx, dword [esp + 8]
mov edi, edx
or edi, 0x1000000
cmp byte [esi + 0x48], 0
cmove edi, edx
pxor xmm0, xmm0
movdqa xmmword [esp + 0x70], xmm0
movsx eax, byte [esi + 0x1b]
test eax, eax
mov edx, dword [ebp + 0xc]
js 0x40f37b
lea ecx, [esi + 0x10]
jmp 0x40f381
call fcn.00536520
mov edx, dword [esp + 8]
lea ecx, [edx + 0x1000000]
cmp eax, 5
cmovl edx, ecx
jmp 0x40f33b
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
test eax, eax
cmove ecx, eax
mov dword [esp + 8], ecx
xor eax, eax
dec eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
cmp byte [edx + 0xb], 0
jns 0x40f5c8
lea ecx, [esp + 0x60]
push dword [edx + 4]
push dword [edx]
call fcn.005421d0
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x40f5de
pxor xmm0, xmm0
movq qword [esp + 0x20], xmm0
mov dword [esp + 0x28], 0
mov cl, byte [esi + 0x58]
test cl, cl
jne 0x40f6c4
xor eax, eax
cmp dword [esi + 0x54], 0
jne 0x40f6c4
movzx ecx, byte [esp + 7]
cmp byte [esp + 0x6b], 0
js 0x40f40b
lea edx, [esp + 0x60]
jmp 0x40f40f
push dword [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x40f465
jmp 0x40f915
mov edx, dword [esp + 0x60]
lea esi, [esp + 0x70]
xor ebx, ebx
push esi
lea esi, [esp + 0x98]
push esi
push dword [esp + 0x10]
push eax
push edi
push ecx
push ebx
push ebx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40f656
cmp byte [esp + 0x2b], 0
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
js 0x40f5b7
pxor xmm0, xmm0
lea ecx, [esp + 0x50]
movdqa xmmword [ecx], xmm0
lea eax, [esp + 0x70]
push eax
call fcn.0042bc80
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x40f3f7
cmp byte [esi + 0x49], 1
je 0x40f74d
cmp byte [esi], 1
je 0x40f8c1
xor eax, eax
mov dword [esp + 0x58], eax
mov esi, dword [esp + 0x50]
mov dword [esp + 0x50], eax
lea eax, [esi + 1]
cmp eax, 2
jb 0x40f493
call fcn.004ffee0
mov ecx, ebx
push esi
call fcn.0040f9b0
lea ecx, [esp + 0x50]
call fcn.0042ced0
cmp byte [esp + 0x6b], 0
jns 0x40f4b7
push dword [esp + 0x60]
call fcn.00564050
add esp, 4
mov eax, dword [esp + 0xd8]
test eax, eax
je 0x40f4c9
push eax
call dword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
mov eax, dword [esp + 0x90]
mov dword [esp + 0x90], 0
test eax, eax
je 0x40f4e8
push eax
call fcn.0056586d
add esp, 4
lea ecx, [esp + 0xe4]
call fcn.00447760
mov dword [esp + 0x20], 0xa
mov al, byte [0x64b456]
test al, al
jne 0x40f896
mov ecx, dword [esp + 0x298]
xor ecx, ebp
call fcn.00567335
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push str....._third_partylibc_srcinclude_vector:1418:_assertion___n___size___failed:_vector___index_out_of_bounds_n
push 0x624e92
call fcn.005912b0
mov edi, dword [ebp + 0x10]
mov edi, dword [edi + 0x24]
mov ebx, dword [ebp + 0x10]
cmp edi, dword [ebx + 0x28]
jne 0x40f556
test ecx, ecx
je 0x40f998
test edx, edx
je 0x40f99b
test esi, esi
je 0x40f98c
or eax, 0x101
mov dword [esp + 0xc0], eax
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd0], edx
mov dword [esp + 0xd4], esi
jmp 0x40f32e
or byte [esp + 0xc0], 0x80
jmp 0x40f2dd
mov dword [esp + 0x9c], 0x62585e
jmp 0x40f2eb
mov ebx, dword [ebp + 8]
mov dword [ebx], 0
mov byte [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f4b7
int3
push dword [esp + 0x20]
call fcn.00564050
add esp, 4
jmp 0x40f448
mov eax, dword [edx + 8]
mov dword [esp + 0x68], eax
movq xmm0, qword [edx]
movq qword [esp + 0x60], xmm0
jmp 0x40f3b1
xor ecx, ecx
lea edx, [esp + 0x20]
mov dword [edx], ecx
push ecx
push eax
push edx
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x40f68c
or edi, 0x400
mov ecx, dword [esp + 0x20]
movzx esi, byte [esp + 7]
cmp byte [esp + 0x6b], 0
js 0x40f612
lea edx, [esp + 0x60]
jmp 0x40f616
mov edx, dword [esp + 0x60]
lea ebx, [esp + 0x70]
xor eax, eax
push ebx
lea ebx, [esp + 0x98]
push ebx
push dword [esp + 0x10]
push ecx
push edi
push esi
push eax
push eax
push edx
push eax
mov eax, dword [ebp + 0x10]
push dword [eax + 0x30]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
push dword [esp + 0x20]
call sub.USERENV.dll_DestroyEnvironmentBlock
test edi, edi
je 0x40f6a8
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
jmp 0x40f448
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
je 0x40f99e
cmp byte [esp + 0x2b], 0
jns 0x40f684
push dword [esp + 0x20]
call fcn.00564050
add esp, 4
mov ebx, dword [ebp + 8]
jmp 0x40f4a4
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f684
jmp 0x40f98f
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f684
jmp 0x40f992
test cl, cl
jne 0x40f707
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
je 0x40f656
mov esi, eax
mov eax, dword [ebp + 0x10]
add eax, 0x4c
lea edx, [esp + 0x50]
push eax
push esi
push edx
call fcn.005c17e0
add esp, 0xc
lea ecx, [esp + 0x50]
mov eax, dword [ecx + 8]
mov dword [esp + 0x28], eax
movq xmm0, qword [ecx]
movq qword [esp + 0x20], xmm0
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x40f731
mov eax, dword [ebp + 0x10]
add eax, 0x4c
lea esi, [esp + 0x50]
push eax
push 0x62ffbe
push esi
call fcn.005c17e0
add esp, 0xc
mov eax, dword [esi + 8]
mov dword [esp + 0x28], eax
movq xmm0, qword [esi]
movq qword [esp + 0x20], xmm0
cmp byte [esp + 0x2b], 0
js 0x40f73e
lea eax, [esp + 0x20]
jmp 0x40f742
mov eax, dword [esp + 0x20]
or edi, 0x400
jmp 0x40f3e5
push dword [esp + 0x50]
call fcn.004f0f50
add esp, 4
push eax
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
jmp 0x40f46f
mov dword [ebx], 0
mov byte [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f4b7
int3
push 0x13e
push str.launch_win.cc
push str.LaunchProcess
lea eax, [esp + 0x2c]
push eax
call fcn.00509c60
add esp, 0x10
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.005bc600
add esp, 8
lea ecx, [esp + 0x8c]
call fcn.00591bc0
jmp 0x40f28c
mov ebx, dword [ebp + 8]
mov dword [ebx], 0
mov byte [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f4b7
int3
mov eax, dword [ebp + 0xc]
movsx eax, byte [eax + 0xb]
test eax, eax
jns 0x40f7f7
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp + 0xc], ecx
test eax, eax
js 0x40f978
sete cl
cmp dword [esp + 0xc], 0
setne dl
or dl, cl
je 0x40f982
mov ecx, dword [ebp + 0x10]
mov bl, byte [ecx]
mov bh, byte [ecx + 0x1c]
lea edi, [esp + 0x90]
push eax
push dword [esp + 0x10]
push edi
call fcn.0045a4e0
add esp, 0xc
movzx eax, bl
movzx esi, bh
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov edx, edi
push eax
push esi
call fcn.005b4fd0
add esp, 8
mov ecx, edi
call fcn.00424e20
jmp 0x40f509
mov ebx, dword [ebp + 8]
mov dword [ebx], 0
mov byte [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40f4b7
int3
movzx eax, al
lea ecx, [esp + 0x90]
mov dword [ecx], str.LaunchProcess
lea edx, [esp + 0x20]
push 1
push ecx
push edx
push eax
call fcn.00591070
add esp, 0x10
jmp 0x40f15b
movzx eax, al
mov dword [esp + 0x90], 0
lea ecx, [esp + 0x20]
push 2
lea edx, [esp + 0x94]
push edx
push ecx
push eax
call fcn.00591070
add esp, 0x10
jmp 0x40f509
pcmpeqd xmm0, xmm0
lea edi, [esp + 0x20]
movdqa xmmword [edi + 0x20], xmm0
movdqa xmmword [edi + 0x10], xmm0
movdqa xmmword [edi], xmm0
lea esi, [esp + 0x10]
push 0x1c2
push str.launch_win.cc
push str.LaunchProcess
push esi
call fcn.00509c60
add esp, 0x10
mov ecx, edi
push 0
push esi
call fcn.00520b90
push 0xffffffffffffffff
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, edi
call fcn.00540880
jmp 0x40f478
xor eax, eax
dec eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x58], eax
mov esi, dword [esp + 0x50]
mov dword [esp + 0x50], eax
lea eax, [esi + 1]
cmp eax, 2
jb 0x40f93b
call fcn.004ffee0
lea edi, [esp + 0x20]
mov ecx, edi
push esi
call fcn.0040f9b0
xor eax, eax
inc eax
mov ecx, edi
push eax
push eax
call fcn.004577b0
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
je 0x40f995
lea ecx, [esp + 0x20]
call fcn.00424320
jmp 0x40f49b
push str....._third_partylibc_srcinclude_string_view:318:_assertion___len___static_cast_size_type__numeric_limits_difference_type_::max____failed:_string_view::string_view__CharT___size_t_:_length_does_not_fit_in_difference_type_n
jmp 0x40f526
push str....._third_partylibc_srcinclude_string_view:320:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
jmp 0x40f526
int3
int3
int3
int3
int3
int3
int3