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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x438008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x64], eax
push 0x3c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x5c], edx
push edi
push eax
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x58], edi
call fcn.0041e810
add esp, 0xc
lea ecx, [ebp - 0x4c]
call fcn.0040f34d
mov esi, eax
test esi, esi
jns 0x40a3ed
push 0x406dec
push esi
call fcn.0040e21e
pop ecx
pop ecx
jmp 0x40a7dc
mov ecx, dword [0x4398c8]
call fcn.0040f3e2
mov esi, eax
test esi, esi
jns 0x40a405
push 0x406e0c
jmp 0x40a3e0
lea ecx, [ebp - 0x54]
call fcn.0040f634
mov esi, eax
test esi, esi
jns 0x40a41a
push 0x406e2c
jmp 0x40a3e0
push dword [0x4398c8]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x406e54
call esi
test eax, eax
jne 0x40a456
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push 0x406e78
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
jmp 0x40a3e0
push dword [ebp - 0x54]
push 0x406e98
call esi
test eax, eax
jne 0x40a48c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push 0x406ec4
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
jmp 0x40a3e0
push dword [0x4398cc]
push 0x406ee8
call esi
test eax, eax
jne 0x40a4c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push 0x406f18
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
jmp 0x40a3e0
push dword [ebp - 0x4c]
push 0x406f40
call esi
test eax, eax
jne 0x40a4fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push 0x406f80
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
jmp 0x40a3e0
cmp dword [ebp - 0x5c], 1
jne 0x40a539
push 0x40725c
push 0x406fb0
call esi
test eax, eax
jne 0x40a539
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push 0x406fd0
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
cmovns esi, eax
jmp 0x40a3e0
mov edx, dword [ebp - 0x60]
lea ecx, [ebp - 0x44]
push edi
call fcn.0040e5b0
mov esi, eax
test esi, esi
jns 0x40a555
push 0x406ff0
jmp 0x40a3e0
push ecx
push ecx
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x44]
call fcn.0040ec14
mov esi, eax
test esi, esi
jns 0x40a572
push 0x407050
jmp 0x40a3e0
push edi
push edi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x58], eax
test eax, eax
jne 0x40a5b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x44]
movzx esi, ax
or esi, 0x80070000
test eax, eax
push edi
cmovle esi, eax
mov eax, 0x80004005
test esi, esi
push 0x40707c
cmovns esi, eax
push esi
call fcn.0040e21e
add esp, 0xc
jmp 0x40a7df
mov edx, eax
lea ecx, [ebp - 0x50]
call fcn.0040e522
mov esi, eax
test esi, esi
jns 0x40a5d3
push 0x4070b4
jmp 0x40a3e0
push dword [ebp - 0x58]
push dword [ebp - 0x50]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40a584
mov edx, dword [0x4398d0]
lea ecx, [ebp - 0x48]
push edi
test edx, edx
je 0x40a60d
call fcn.0040e7c6
push dword [ebp - 0x48]
push 0x4070ec
push 1
call fcn.0040e1a2
add esp, 0xc
jmp 0x40a675
mov edx, dword [0x4398cc]
call fcn.0040e7c6
push edi
mov edx, 0x407108
lea ecx, [ebp - 0x48]
call fcn.0040e7c6
mov esi, 0x407118
lea ecx, [ebp - 0x48]
push edi
mov edx, esi
call fcn.0040e7c6
push edi
mov edx, 0x40711c
lea ecx, [ebp - 0x48]
call fcn.0040e7c6
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x48]
push edi
call fcn.0040e7c6
push edi
mov edx, 0x407148
lea ecx, [ebp - 0x48]
call fcn.0040e7c6
mov edx, dword [ebp - 0x4c]
lea ecx, [ebp - 0x48]
push edi
call fcn.0040e7c6
push edi
mov edx, esi
lea ecx, [ebp - 0x48]
call fcn.0040e7c6
push edi
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
test esi, esi
jns 0x40a68d
push 0x40718c
jmp 0x40a3e0
cmp dword [0x4398e8], 1
mov ecx, 0x4071b4
mov edx, dword [ebp - 0x48]
mov eax, 0x4071a8
cmovne eax, ecx
mov dword [ebp - 0x40], 0x3c
mov ecx, dword [ebp - 0x50]
push edx
push ecx
mov dword [ebp - 0x34], eax
mov eax, dword [0x4398c8]
push 0x4071c0
push 1
mov dword [ebp - 0x3c], 0x540
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 5
call fcn.0040e1a2
add esp, 0x10
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x40a783
mov eax, dword [ebp - 0x20]
cmp eax, 0x1b
ja 0x40a746
je 0x40a76d
dec eax
sub eax, 1
je 0x40a73f
sub eax, 1
je 0x40a738
dec eax
sub eax, 1
je 0x40a723
sub eax, 3
je 0x40a71c
sub eax, 3
jne 0x40a75f
mov esi, 0x8007000b
jmp 0x40a779
mov esi, 0x8007000e
jmp 0x40a779
push 0x4071f8
push 1
call fcn.0040e1a2
pop ecx
pop ecx
mov esi, 0x80070642
jmp 0x40a779
mov esi, 0x80070003
jmp 0x40a779
mov esi, 0x80070002
jmp 0x40a779
sub eax, 0x1c
je 0x40a774
sub eax, 1
je 0x40a774
sub eax, 1
je 0x40a774
sub eax, 1
je 0x40a76d
sub eax, 1
je 0x40a766
mov esi, 0x80004005
jmp 0x40a779
mov esi, 0x80070485
jmp 0x40a779
mov esi, 0x80070483
jmp 0x40a779
mov esi, 0x80070484
push 0x40721c
jmp 0x40a3e0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetProcessId]
mov esi, eax
mov ecx, esi
call fcn.0040a338
test al, al
jne 0x40a7a7
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x40a78e
call fcn.0040b1a7
mov esi, eax
test esi, esi
jns 0x40a7bc
push 0x407238
jmp 0x40a3e0
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x64]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x44]
cmp dword [ebp - 0x4c], 0
je 0x40a7ed
mov ecx, dword [ebp - 0x4c]
call fcn.0040f3e2
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x40a7fb
mov ecx, eax
call fcn.0040eb78
test edi, edi
je 0x40a806
mov ecx, edi
call fcn.0040eb78
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40a814
mov ecx, eax
call fcn.0040eb78
cmp dword [ebp - 0x4c], 0
je 0x40a822
mov ecx, dword [ebp - 0x4c]
call fcn.0040eb78
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40a830
mov ecx, eax
call fcn.0040eb78
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.0041d15a
leave
ret 4