Function at 0x401220
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403e7e
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x407040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.username
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
mov dword [ebp - 0xe8], 0
mov esi, edi
mov dword [ebp - 0xdc], edi
xorps xmm0, xmm0
mov dword [ebp - 0xe4], 0
add esp, 4
movups xmmword [ebp - 0xf8], xmm0
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401286
sub esi, ecx
cmp esi, 0x7fffffff
ja 0x401713
cmp esi, 0xf
ja 0x4012cb
push esi
lea eax, [ebp - 0xf8]
mov dword [ebp - 0xe8], esi
push edi
push eax
mov dword [ebp - 0xe4], 0xf
call sub.VCRUNTIME140.dll_memcpy
mov byte [ebp + esi - 0xf8], 0
jmp 0x401360
mov edi, esi
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x401303
mov ecx, 0x80000000
mov edi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.00402fb3
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x401592
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x401331
mov eax, 0x16
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
test eax, eax
je 0x401331
cmp eax, 0x1000
jb 0x401328
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401718
jmp 0x4012e5
push eax
call fcn.00402fb3
add esp, 4
push esi
push dword [ebp - 0xdc]
mov dword [ebp - 0xe0], eax
push eax
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xe8], esi
mov dword [ebp - 0xe4], edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0xe0]
mov byte [eax + esi], 0
add esp, 0xc
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xe4]
mov eax, ecx
mov edx, dword [ebp - 0xe8]
sub eax, edx
cmp eax, 9
jb 0x401406
cmp ecx, 0xf
lea esi, [ebp - 0xf8]
lea eax, [edx + 9]
cmova esi, dword [ebp - 0xf8]
mov dword [ebp - 0xe8], eax
cmp esi, 0x4052d5
jae 0x4013c4
lea eax, [esi + edx]
cmp eax, str.C:Users_
jb 0x4013c4
cmp esi, str.C:Users_
ja 0x4013ba
xor edi, edi
jmp 0x4013c9
mov edi, esi
sub edi, str.C:Users_
jmp 0x4013c9
mov edi, 9
lea eax, [edx + 1]
push eax
lea ecx, [esi + 9]
push esi
push ecx
call sub.VCRUNTIME140.dll_memmove
push edi
push str.C:Users_
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, 9
lea ecx, [esi + edi]
sub eax, edi
push eax
lea eax, [edi + 0x4052d5]
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x24
lea eax, [ebp - 0xf8]
jmp 0x401425
push 9
sub esp, 8
mov byte [ebp - 0xdc], 0
lea ecx, [ebp - 0xf8]
push dword [ebp - 0xdc]
push 9
call fcn.00402dd0
mov dword [ebp - 0x100], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x110], xmm0
mov dword [ebp - 0xfc], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x110], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x100], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0xfc]
mov eax, edx
mov ecx, dword [ebp - 0x100]
sub eax, ecx
push 0x50
cmp eax, 0x50
jb 0x4014bb
cmp edx, 0xf
lea esi, [ebp - 0x110]
lea eax, [ecx + 0x50]
cmova esi, dword [ebp - 0x110]
add esi, ecx
mov dword [ebp - 0x100], eax
push str.AppDataRoamingMicrosoftWindowsStart_MenuProgramsStartupWindowsUpdate.cmd
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0x50], 0
lea eax, [ebp - 0x110]
jmp 0x4014d6
push ecx
mov byte [ebp - 0xdc], 0
lea ecx, [ebp - 0x110]
push dword [ebp - 0xdc]
push 0x50
call fcn.00402ba0
mov dword [ebp - 0x18], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0xfc]
cmp ecx, 0xf
jbe 0x401547
mov edx, dword [ebp - 0x110]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40153d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401592
push ecx
push edx
call fcn.00402fe3
add esp, 8
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xfc], 0xf
mov byte [ebp - 0x110], 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xe4]
cmp ecx, 0xf
jbe 0x4015a2
mov edx, dword [ebp - 0xf8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401598
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401598
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402fe3
add esp, 8
push 0xb0
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xe8], 0
push 0
push eax
mov dword [ebp - 0xe4], 0xf
mov byte [ebp - 0xf8], 0
call sub.VCRUNTIME140.dll_memset
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0xd8]
cmova eax, dword [ebp - 0x28]
push eax
call fcn.00402550
mov eax, dword [ebp - 0xd8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xd8], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xd8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xdc], eax
mov edx, str._echo_off_n
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xd8]
call fcn.00402740
mov edx, str.mode_con:cols70_lines30_n
mov ecx, eax
call fcn.00402740
mov edx, str.echo_Testing_connection_to_update_server_._._._n
mov ecx, eax
call fcn.00402740
mov edx, str.Ping_www.microsoft.com__n_1__w_1000_n
mov ecx, eax
call fcn.00402740
mov edx, str.cls_n
mov ecx, eax
call fcn.00402740
mov edx, str.if_errorlevel_1___n
mov ecx, eax
call fcn.00402740
mov edx, str._texit_n
mov ecx, eax
call fcn.00402740
mov edx, 0x405300
mov ecx, eax
call fcn.00402740
mov edx, str.title_Rickroll_n
mov ecx, eax
call fcn.00402740
mov edx, str.curl_ascii.live_rick
mov ecx, eax
call fcn.00402740
lea ecx, [ebp - 0xd4]
call fcn.004024c0
test eax, eax
jne 0x4016b5
push eax
mov eax, dword [ebp - 0xd8]
lea ecx, [ebp - 0xd8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0xd8]
call fcn.00401720
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x4016f6
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4016ec
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4016ec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402fe3
add esp, 8
xor eax, eax
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.00402fa5
mov esp, ebp
pop ebp
ret
call fcn.00401170
call fcn.004010d0
int3