Function at 0x497820
Capabilities:
Create process on windows
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x100
mov esi, esp
mov dword [esi + 0xe8], ebp
mov dword [esi + 0xec], esp
mov dword [esi + 0xf8], 0xffffffff
mov dword [esi + 0xf4], 0x5bbf70
mov ecx, dword [ebp + 0x10]
lea edx, [esi + 0xf0]
mov eax, dword fs:[0]
mov dword [esi + 0xf0], eax
mov dword fs:[0], edx
mov edx, dword [ebp + 0xc]
cmp byte [ecx + 0x1d], 0
je 0x4978c1
movzx eax, byte [ecx + 0x1c]
movzx ebx, byte [ecx]
cmp dword [edx + 0x14], 7
mov dword [esi + 0xc], eax
mov eax, dword [edx + 0x10]
jbe 0x49788b
mov edx, dword [edx]
lea edi, [esi + 0x74]
push eax
push edx
push edi
call fcn.00497650
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [esi + 0xf8], 0
mov edx, edi
push ebx
push dword [esi + 0xc]
call fcn.005bbb60
add esp, 8
lea ecx, [esi + 0x74]
call fcn.00473320
jmp 0x497ee9
lea edi, [esi + 0x74]
push 0x112
push str.processlaunch_win.cc
push str.LaunchProcess
push edi
call fcn.004716a0
add esp, 0x10
lea ecx, [esi + 0xd8]
push 0x6d3d20
push edi
call fcn.004982c0
lea ecx, [esi + 0x74]
mov dword [esi + 0xf8], 7
call fcn.00435880
mov eax, dword [ebp + 0x10]
mov ecx, 0
mov dword [esi + 0x14], 0
cmp byte [eax + 0x6a], 0
je 0x49792b
mov dword [esi + 0xf8], 8
call fcn.00406c70
xor ecx, ecx
cmp eax, 0xf
setg cl
mov edx, dword [ebp + 0x10]
xor eax, eax
mov edi, dword [edx + 0x24]
mov ebx, dword [edx + 0x28]
cmp edi, ebx
setne al
add eax, ecx
je 0x497966
mov dword [esi + 0xf8], 8
lea ecx, [esi + 0x74]
push eax
call fcn.00435c90
test al, al
je 0x49799f
mov edx, dword [ebp + 0x10]
mov dword [esi + 0x14], 0x80000
mov edi, dword [edx + 0x24]
mov ebx, dword [edx + 0x28]
cmp dword [edx + 0x20], 1
sete cl
cmp edi, ebx
je 0x497a0b
mov eax, ebx
mov dword [esi + 0x10], ebx
sub eax, edi
sar eax, 2
cmp eax, 0x3fffffff
jbe 0x4979ae
mov ecx, dword [ebp + 8]
mov dword [esi + 0xf8], 8
push 0
call fcn.004117c0
jmp 0x497ed6
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
jmp 0x497ed6
mov ecx, edi
mov dword [esi + 0xc], edi
nop word cs:[eax + eax]
nop dword [eax]
mov eax, dword [esi + 0xc]
mov dword [esi + 0xf8], 8
cmp eax, dword [esi + 0x10]
je 0x4979e7
push 1
push 1
mov eax, dword [esi + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
add dword [esi + 0xc], 4
jmp 0x4979c0
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x24]
mov edx, dword [ecx + 0x28]
lea ecx, [esi + 0x74]
sub edx, eax
push edx
push eax
push 0x20002
call fcn.00435d90
mov cl, 1
test al, al
je 0x497b7f
mov eax, dword [ebp + 0x10]
cmp byte [eax + 0x1e], 0
je 0x497a1b
or byte [esi + 0xa4], 0x80
mov eax, dword [ebp + 0x10]
mov byte [esi + 0x10], cl
cmp byte [eax + 0x34], 0
je 0x497a31
mov dword [esi + 0x80], 0x658578
mov eax, dword [esi + 0xa4]
mov edi, dword [ebp + 0x10]
mov ecx, eax
or ecx, 1
mov dword [esi + 0xa4], ecx
movzx ecx, byte [edi + 0x1c]
xor ecx, 1
mov word [esi + 0xa8], cx
mov ecx, dword [edi + 0x5c]
test ecx, ecx
je 0x497a5f
mov edx, dword [edi + 0x60]
jmp 0x497a6c
mov edx, dword [edi + 0x60]
test edx, edx
jne 0x497a6c
cmp dword [edi + 0x64], 0
je 0x497a8c
or eax, 0x101
mov dword [esi + 0xa4], eax
mov dword [esi + 0xb0], ecx
mov dword [esi + 0xb4], edx
mov eax, dword [edi + 0x64]
mov dword [esi + 0xb8], eax
cmp dword [edi + 0x38], 0
je 0x497ab2
mov dword [esi + 0xf8], 8
call fcn.00406c70
mov edx, dword [esi + 0x14]
cmp eax, 5
lea ecx, [edx + 0x1000000]
cmovl edx, ecx
jmp 0x497ab5
mov edx, dword [esi + 0x14]
mov eax, dword [ebp + 0x10]
mov ebx, edx
xorps xmm0, xmm0
or ebx, 0x1000000
cmp byte [eax + 0x68], 0
movaps xmmword [esi + 0xc0], xmm0
cmove ebx, edx
cmp dword [eax + 0x14], 0
mov edx, dword [ebp + 0xc]
je 0x497ae7
cmp dword [eax + 0x18], 8
lea ecx, [eax + 4]
jb 0x497ae9
mov ecx, dword [ecx]
jmp 0x497ae9
xor ecx, ecx
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov edi, dword [edx + 0x10]
cmp dword [edx + 0x14], 7
jbe 0x497b02
mov edx, dword [edx]
cmp edi, 7
mov dword [esi + 0x14], ecx
mov dword [esi + 0xc], ebx
ja 0x497b2a
movsd xmm0, qword [edx]
movsd xmm1, qword [edx + 8]
mov eax, 7
movsd qword [esi + 0x40], xmm1
movsd qword [esi + 0x38], xmm0
jmp 0x497bc1
mov eax, edi
mov ecx, 0x7ffffffe
mov dword [esi + 0x34], edx
mov dword [esi + 0x54], edi
or eax, 7
cmp eax, 0x7ffffffe
mov dword [esi + 0x70], eax
cmovb ecx, eax
lea eax, [ecx + ecx]
cmp ecx, 0x7ff
jb 0x497b8e
cmp ecx, 0x7fffffee
mov dword [esi + 0xf8], 8
jae 0x49803d
add eax, 0x25
push eax
call fcn.005d0220
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x497ba4
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
jmp 0x497ed6
add eax, 2
mov dword [esi + 0xf8], 8
push eax
call fcn.005d0220
add esp, 4
mov edi, dword [esi + 0x54]
mov ebx, dword [esi + 0xc]
mov dword [esi + 0x38], eax
lea ecx, [edi + edi + 2]
push ecx
push dword [esi + 0x34]
push eax
call fcn.0061e340
add esp, 0xc
mov eax, dword [esi + 0x70]
test bl, 4
mov dword [esi + 0x48], edi
mov dword [esi + 0x4c], eax
je 0x497c05
mov eax, dword [0x6d1080]
mov dword [esi + 0xf8], 9
push str.Creating_a_suspended_process_can_lead_to_hung_processes_if_the
push eax
call fcn.005df800
add esp, 8
push str.launching_process_is_killed_before_it_assigns_the_process_to_the
push eax
call fcn.005df800
add esp, 8
push str.job._https:__crbug.com_820996
push eax
call fcn.005df800
add esp, 8
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x30]
test eax, eax
je 0x497c46
mov ecx, dword [edx + 0x4c]
movzx edi, byte [esi + 0x10]
or dword [esi + 0xc], 0x400
mov dword [esi + 0x80], ecx
mov dword [esi + 0x10], edi
lea ecx, [edx + 0x40]
mov edi, dword [edx + 0x40]
mov ebx, dword [edx + 0x3c]
test edi, edi
cmove ecx, edi
cmp dword [esi + 0x4c], 7
jbe 0x497cea
mov edi, dword [esi + 0x38]
jmp 0x497ced
mov dword [esi + 0x2c], 7
mov dword [esi + 0x28], 0
mov word [esi + 0x18], 0
cmp byte [edx + 0x74], 0
je 0x497f00
lea eax, [edx + 0x6c]
mov dword [esi + 0xf8], 0xc
lea ecx, [esi + 0x58]
push eax
push 0x69b2ee
push ecx
call fcn.005bbf80
add esp, 0xc
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
jb 0x497cbe
mov eax, dword [esi + 0x18]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x497cb4
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x498051
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
movsd xmm0, qword [esi + 0x68]
movsd xmm2, qword [esi + 0x58]
movsd xmm1, qword [esi + 0x60]
movsd qword [esi + 0x28], xmm0
movsd qword [esi + 0x20], xmm1
movsd qword [esi + 0x18], xmm2
cmp dword [esi + 0x2c], 7
mov ebx, dword [esi + 0xc]
jbe 0x497d2f
mov eax, dword [esi + 0x18]
jmp 0x497d32
lea edi, [esi + 0x38]
lea edx, [esi + 0xc0]
mov dword [esi + 0xf8], 9
push edx
lea edx, [esi + 0x78]
push edx
push 0
push ebx
push dword [esi + 0xc]
push dword [esi + 0x10]
push 0
push ecx
push edi
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x497dad
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
jmp 0x497e9b
lea eax, [esi + 0x18]
mov cl, byte [esi + 0x10]
or ebx, 0x400
cmp dword [esi + 0x4c], 7
movzx ecx, cl
jbe 0x497d49
mov edx, dword [esi + 0x38]
jmp 0x497d4c
lea edx, [esi + 0x38]
lea edi, [esi + 0xc0]
push edi
lea edi, [esi + 0x78]
push edi
push dword [esi + 0x14]
push eax
push ebx
push ecx
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x497fa3
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
jb 0x497dad
mov eax, dword [esi + 0x18]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x497da3
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x498060
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea eax, [esi + 0xc0]
mov dword [esi + 0xf8], 9
lea ecx, [esi + 0x18]
push eax
call fcn.0043df50
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x497de9
mov ecx, dword [esi + 0x18]
mov dword [esi + 0xf8], 0xa
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
test eax, eax
je 0x497e5a
mov eax, dword [ebp + 0x10]
cmp byte [eax + 0x69], 0
je 0x497e0f
mov eax, dword [esi + 0x18]
mov dword [esi + 0xf8], 0xa
push eax
call fcn.004736f0
add esp, 4
push eax
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0
mov dword [esi + 0xf8], 0xa
je 0x497e47
lea eax, [esi + 0x58]
push 0x1da
push str.processlaunch_win.cc
push str.LaunchProcess
push eax
call fcn.004716a0
add esp, 0x10
push 0xffffffffffffffff
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [esi + 0x18]
call fcn.00473100
mov ecx, dword [ebp + 8]
push eax
call fcn.004117c0
jmp 0x497e93
lea ecx, [esi + 0x18]
call fcn.00473100
lea ecx, [esi + 0x58]
push eax
call fcn.004117c0
mov dword [esi + 0xf8], 0xb
lea ecx, [esi + 0x58]
push 1
push 1
call fcn.004a04d0
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
lea ecx, [esi + 0x58]
call fcn.00436760
lea ecx, [esi + 0x18]
call fcn.0043e4b0
mov ecx, dword [esi + 0x4c]
cmp ecx, 8
jb 0x497ed6
mov eax, dword [esi + 0x38]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x497ecc
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x498042
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea ecx, [esi + 0x74]
call fcn.00472f20
lea ecx, [esi + 0xd8]
call fcn.00498380
mov eax, dword [esi + 0xf0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [edx + 0x70], 0
mov dword [esi + 0xf8], 0xc
je 0x497fe6
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edx, eax
test eax, eax
je 0x497ff3
mov eax, dword [ebp + 0x10]
lea ecx, [esi + 0x58]
add eax, 0x6c
push eax
push edx
push ecx
mov dword [esi + 0x34], edx
call fcn.005bbf80
mov edi, dword [esi + 0x34]
add esp, 0xc
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
jb 0x497f79
mov eax, dword [esi + 0x18]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x497f6f
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x49806f
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
movsd xmm0, qword [esi + 0x68]
movsd xmm2, qword [esi + 0x58]
movsd xmm1, qword [esi + 0x60]
movsd qword [esi + 0x28], xmm0
movsd qword [esi + 0x20], xmm1
movsd qword [esi + 0x18], xmm2
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x497cdc
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
jb 0x497e9b
mov eax, dword [esi + 0x18]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x49802e
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jb 0x498027
mov dword [esi + 0xf8], 5
call fcn.006207e0
mov cl, byte [esi + 0x10]
mov ebx, dword [esi + 0xc]
xor eax, eax
jmp 0x497d3b
mov ecx, dword [ebp + 8]
push 0
call fcn.004117c0
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
jb 0x497e9b
mov eax, dword [esi + 0x18]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x49802e
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x49807e
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
jmp 0x497e9b
call fcn.005e8c60
mov dword [esi + 0xf8], 6
call fcn.006207e0
mov dword [esi + 0xf8], 1
call fcn.006207e0
mov dword [esi + 0xf8], 4
call fcn.006207e0
mov dword [esi + 0xf8], 2
call fcn.006207e0
mov dword [esi + 0xf8], 3
call fcn.006207e0
nop dword [eax]
push ebp
sub esp, 0x2c
lea esi, [ebp - 0xfc]
mov ebp, dword [esi + 0xe8]
lea ecx, [esi + 0x74]
call fcn.00473320
add esp, 0x2c
pop ebp
ret