Function at 0x40e790
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 [0x644040]
xor eax, ebp
mov dword [esp + 0x298], eax
lea esi, [esp + 0x108]
push 0x190
push 0
push esi
call fcn.00569910
mov ecx, edi
add esp, 0xc
cmp byte [edi + 0xb], 0
mov eax, edi
jns 0x40e7d6
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 0x40e800
inc ecx
cmp ecx, 0xc8
jne 0x40e7dc
mov word [esp + 0x296], 0
push esi
call fcn.004ef3c0
add esp, 4
mov eax, dword [ebp + 0x10]
cmp byte [eax + 0x1d], 0
jne 0x40ee35
mov dword [esp + 0x20], 0xa
mov al, byte [0x649446]
test al, al
jne 0x40ef3a
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.005068d0
add esp, 0x10
mov ecx, edi
push 0x6496e0
push esi
call fcn.00444290
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], 0
mov ecx, 0
je 0x40e8b8
call fcn.00539850
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 0x40e8e4
lea ecx, [esp + 0x90]
push eax
call fcn.00418b60
mov dword [esp + 8], 0x80000
test al, al
je 0x40eea1
cmp byte [esi + 0x4a], 0
je 0x40e92e
call fcn.00539850
cmp eax, 0x10
jl 0x40e92e
or byte [esp + 0xfb], 0x20
mov eax, dword [esp + 0xd8]
test eax, eax
je 0x40ef1c
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 0x40ef1c
cmp dword [esi + 0x20], 1
mov edi, dword [esi + 0x24]
sete cl
mov ebx, dword [esi + 0x28]
cmp edi, ebx
je 0x40e9a3
cmp ebx, edi
js 0x40eefe
xor esi, esi
inc esi
push esi
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x40eebc
add edi, 4
cmp edi, ebx
jne 0x40e94a
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
sub ecx, eax
je 0x40ebf1
mov edx, dword [esp + 0xd8]
test edx, edx
je 0x40ec69
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 0x40ec69
cmp byte [esi + 0x1e], 0
jne 0x40ec4c
mov byte [esp + 7], cl
cmp byte [esi + 0x34], 0
jne 0x40ec59
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 0x40ec00
test edx, edx
jne 0x40ec00
test esi, esi
jne 0x40ec00
mov esi, dword [ebp + 0x10]
cmp dword [esi + 0x38], 0
jne 0x40ea34
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 0x40ea4b
lea ecx, [esi + 0x10]
jmp 0x40ea51
call fcn.00539850
mov edx, dword [esp + 8]
lea ecx, [edx + 0x1000000]
cmp eax, 5
cmovl edx, ecx
jmp 0x40ea0b
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 0x40ec98
lea ecx, [esp + 0x60]
push dword [edx + 4]
push dword [edx]
call fcn.00506680
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x40ecae
pxor xmm0, xmm0
movq qword [esp + 0x20], xmm0
mov dword [esp + 0x28], 0
mov cl, byte [esi + 0x58]
test cl, cl
jne 0x40edd3
xor eax, eax
cmp dword [esi + 0x54], 0
jne 0x40edd3
movzx ecx, byte [esp + 7]
cmp byte [esp + 0x6b], 0
js 0x40eadb
lea edx, [esp + 0x60]
jmp 0x40eadf
push dword [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
jne 0x40eb35
jmp 0x40efdf
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 0x40ed26
cmp byte [esp + 0x2b], 0
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
js 0x40ec87
pxor xmm0, xmm0
lea ecx, [esp + 0x50]
movdqa xmmword [ecx], xmm0
lea eax, [esp + 0x70]
push eax
call fcn.00433690
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x40eac7
cmp byte [esi + 0x49], 0
jne 0x40ee1d
cmp byte [esi], 0
jne 0x40ef8b
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 0x40eb63
call fcn.004ef4b0
mov ecx, ebx
push esi
call fcn.0040f070
lea ecx, [esp + 0x50]
call fcn.00417d70
cmp byte [esp + 0x6b], 0
jns 0x40eb87
push dword [esp + 0x60]
call fcn.00564ea0
add esp, 4
mov eax, dword [esp + 0xd8]
test eax, eax
je 0x40eb99
push eax
call dword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
mov eax, dword [esp + 0x90]
mov dword [esp + 0x90], 0
test eax, eax
je 0x40ebb8
push eax
call fcn.005666bd
add esp, 4
lea ecx, [esp + 0xe4]
call fcn.00444130
mov dword [esp + 0x20], 0xa
mov al, byte [0x649446]
test al, al
jne 0x40ef60
mov ecx, dword [esp + 0x298]
xor ecx, ebp
call fcn.00568175
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 0x624173
call fcn.00591ed0
mov edi, dword [ebp + 0x10]
mov edi, dword [edi + 0x24]
mov ebx, dword [ebp + 0x10]
cmp edi, dword [ebx + 0x28]
jne 0x40ec26
test ecx, ecx
je 0x40f062
test edx, edx
je 0x40f065
test esi, esi
je 0x40f056
or eax, 0x101
mov dword [esp + 0xc0], eax
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd0], edx
mov dword [esp + 0xd4], esi
jmp 0x40e9fe
or byte [esp + 0xc0], 0x80
jmp 0x40e9ad
mov dword [esp + 0x9c], 0x624c5e
jmp 0x40e9bb
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 0x40eb87
int3
push dword [esp + 0x20]
call fcn.00564ea0
add esp, 4
jmp 0x40eb18
mov eax, dword [edx + 8]
mov dword [esp + 0x68], eax
movq xmm0, qword [edx]
movq qword [esp + 0x60], xmm0
jmp 0x40ea81
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 0x40ed5c
or edi, 0x400
mov ecx, dword [esp + 0x20]
movzx esi, byte [esp + 7]
cmp byte [esp + 0x6b], 0
js 0x40ece2
lea edx, [esp + 0x60]
jmp 0x40ece6
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 0x40ed78
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
jmp 0x40eb18
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 0x40f068
cmp byte [esp + 0x2b], 0
jns 0x40ed54
push dword [esp + 0x20]
call fcn.00564ea0
add esp, 4
mov ebx, dword [ebp + 8]
jmp 0x40eb74
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 0x40ed54
jmp 0x40f059
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 0x40ed54
jmp 0x40f05c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
je 0x40ed26
mov esi, eax
mov eax, dword [ebp + 0x10]
add eax, 0x4c
lea edx, [esp + 0x50]
push eax
push esi
push edx
call fcn.005c2580
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 0x40ee01
test cl, cl
je 0x40ed94
mov eax, dword [ebp + 0x10]
add eax, 0x4c
lea esi, [esp + 0x50]
push eax
push 0x62edde
push esi
call fcn.005c2580
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 0x40ee0e
lea eax, [esp + 0x20]
jmp 0x40ee12
mov eax, dword [esp + 0x20]
or edi, 0x400
jmp 0x40eab5
push dword [esp + 0x50]
call fcn.004ecb60
add esp, 4
push eax
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
jmp 0x40eb3f
mov eax, dword [ebp + 0xc]
movsx eax, byte [eax + 0xb]
test eax, eax
jns 0x40ee4c
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp + 0xc], ecx
test eax, eax
js 0x40f042
mov ecx, dword [ebp + 0x10]
mov bl, byte [ecx]
mov bh, byte [ecx + 0x1c]
je 0x40ee69
cmp dword [esp + 0xc], 0
je 0x40f04c
lea edi, [esp + 0x90]
push eax
push dword [esp + 0x10]
push edi
call fcn.004564d0
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.005b67a0
add esp, 8
mov ecx, edi
call fcn.00423de0
jmp 0x40ebd9
mov dword [ebx], 0
mov byte [ebx + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, eax
jne 0x40eb87
int3
push 0x13e
push str.launch_win.cc
push str.LaunchProcess
lea eax, [esp + 0x2c]
push eax
call fcn.005068d0
add esp, 0x10
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.005bdac0
add esp, 8
lea ecx, [esp + 0x8c]
call fcn.00592840
jmp 0x40e95c
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 0x40eb87
int3
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 0x40eb87
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.0059ce00
add esp, 0x10
jmp 0x40e82b
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.0059d990
add esp, 0x10
jmp 0x40ebd9
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.005068d0
add esp, 0x10
mov ecx, edi
push 0
push esi
call fcn.00520190
push 0xffffffffffffffff
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, edi
call fcn.0053b480
jmp 0x40eb48
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 0x40f005
call fcn.004ef4b0
lea edi, [esp + 0x20]
mov ecx, edi
push esi
call fcn.0040f070
xor eax, eax
inc eax
mov ecx, edi
push eax
push eax
call fcn.00453490
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 0x40f05f
lea ecx, [esp + 0x20]
call fcn.00420240
jmp 0x40eb6b
push str....._third_partylibc_srcinclude_string_view:314:_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 0x40ebf6
push str....._third_partylibc_srcinclude_string_view:316:_assertion___len__0____s___nullptr_failed:_string_view::string_view__CharT___size_t_:_received_nullptr_n
jmp 0x40ebf6
int3
int3
int3
int3
int3
int3
int3