Function at 0x42001f
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb08
push ebx
mov ebx, ecx
lea ecx, [ebp - 8]
push edi
call fcn.00404b39
xor edi, edi
lea ecx, [ebp - 8]
push edi
push edi
push 3
push 3
push 0x80000000
push dword [ebx + 0x191c]
call fcn.004050c9
test eax, eax
je 0x4200be
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], edi
push eax
lea ecx, [ebp - 8]
mov dword [ebp - 0x20], edi
call fcn.00404ffe
mov ecx, 0x80000
cmp dword [ebp - 0x20], edi
ja 0x420076
mov eax, dword [ebp - 0x24]
cmp eax, ecx
jbe 0x420078
mov eax, ecx
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [ebx + 0x1920], eax
pop ecx
test eax, eax
jne 0x420094
push 0x8007000e
jmp 0x4200d1
push edi
push edi
push edi
push 0xc350
lea ecx, [ebp - 8]
call fcn.00405110
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
lea ecx, [ebp - 8]
push dword [ebx + 0x1920]
call fcn.004050d2
test eax, eax
jne 0x4200df
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jle 0x4200d0
movzx eax, ax
or eax, 0x80070000
push eax
mov ecx, ebx
call fcn.00420c69
mov edi, eax
jmp 0x4206f0
mov eax, dword [ebp - 0x14]
add eax, 0xffffffee
mov dword [ebp - 0xc], eax
push esi
mov esi, edi
test eax, eax
jle 0x4206e1
mov eax, dword [ebx + 0x1920]
mov dword [ebp - 0x10], eax
push 5
lea ecx, [eax + esi]
push str.SCSFX
push ecx
mov ecx, ebx
call fcn.0041f44b
test eax, eax
je 0x420134
mov eax, dword [ebp - 0x10]
add eax, esi
cmp dword [eax + 6], 0x1b0cf
jne 0x420134
cmp dword [eax + 0xa], 7
jb 0x420134
cmp dword [eax + 0xe], edi
jbe 0x420134
cmp dword [eax + 0xe], 0x10000
jb 0x420143
inc esi
cmp esi, dword [ebp - 0xc]
jge 0x4206e1
mov eax, dword [ebp - 0x10]
jmp 0x4200fc
call fcn.00403f7e
push eax
lea ecx, [ebp - 0x18]
call fcn.0041e7f0
push edi
push str..tmp
lea ecx, [ebp - 0x18]
call fcn.0041fa10
lea ecx, [ebp - 0x2c]
call fcn.00404b39
push edi
push 0x20
push 2
push 1
push 0x40000000
push dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
call fcn.00404ce4
test eax, eax
jne 0x42019a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jle 0x420194
movzx eax, ax
or eax, 0x80070000
push eax
jmp 0x420274
push edi
push edi
lea eax, [esi + 0xc362]
push edi
push eax
lea ecx, [ebp - 8]
call fcn.00405110
mov ecx, dword [ebp - 0x10]
push edi
push edi
push 3
mov eax, dword [ecx + esi + 0xe]
lea ecx, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0xc], edi
call fcn.004050d2
cmp byte [ebp - 0x1c], 0xef
jne 0x4201e4
cmp byte [ebp - 0x1b], 0xbb
jne 0x4201e4
cmp byte [ebp - 0x1a], 0xbf
jne 0x4201e4
mov dword [ebp - 0xc], 1
jmp 0x4201f6
push edi
push edi
push edi
lea eax, [esi + 0xc362]
push eax
lea ecx, [ebp - 8]
call fcn.00405110
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x42023d
mov esi, 0x80000
cmp eax, esi
jbe 0x420208
mov eax, esi
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], edi
push ecx
push eax
push dword [ebx + 0x1920]
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push dword [ebp - 0x10]
lea ecx, [ebp - 0x2c]
push dword [ebx + 0x1920]
call fcn.004051dd
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
jne 0x420202
lea ecx, [ebp - 0x2c]
call fcn.00404c8c
mov eax, dword [ebx + 0x1920]
test eax, eax
je 0x42025d
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov dword [ebx + 0x1920], edi
push dword [ebp - 0xc]
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
call fcn.0041fed1
test eax, eax
jne 0x420282
push 0x800402e1
mov ecx, ebx
call fcn.00420c69
mov edi, eax
jmp 0x4206cc
push dword [ebp - 0x18]
call fcn.004053d3
pop ecx
push edi
push edi
lea eax, [ebx + 4]
push 4
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea eax, [ebx + 8]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea eax, [ebx + 0xc]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x10]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
mov eax, 0xff
cmp dword [esi], edi
jbe 0x4202ea
cmp dword [esi], eax
jbe 0x4202da
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x14]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x114]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x42031f
mov eax, 0xfff
cmp dword [esi], eax
jbe 0x42030c
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x118]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea eax, [ebx + 0x1118]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x111c]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x420367
mov eax, 0xff
cmp dword [esi], eax
jbe 0x420354
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x1120]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x1220]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x42039c
mov eax, 0xff
cmp dword [esi], eax
jbe 0x420389
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x1224]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x1334]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x4203d1
mov eax, 0xff
cmp dword [esi], eax
jbe 0x4203be
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x1338]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
lea eax, [ebx + 0x1448]
push 4
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
lea eax, [ebx + 0x144c]
push 4
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x1450]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x42042c
mov eax, 0xff
cmp dword [esi], eax
jbe 0x420419
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x1454]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x1554]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x420461
mov eax, 0xff
cmp dword [esi], eax
jbe 0x42044e
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x1558]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
push edi
push edi
push 4
lea esi, [ebx + 0x1668]
push esi
lea ecx, [ebp - 8]
call fcn.004050d2
cmp dword [esi], edi
jbe 0x420496
mov eax, 0xff
cmp dword [esi], eax
jbe 0x420483
mov dword [esi], eax
push edi
push edi
push dword [esi]
lea eax, [ebx + 0x166c]
push eax
lea ecx, [ebp - 8]
call fcn.004050d2
lea ecx, [ebp - 8]
call fcn.00404c8c
cmp dword [ebp - 0x20], edi
ja 0x4204b8
jb 0x4204ae
cmp dword [ebp - 0x24], 0x1000000
ja 0x4204b8
mov dword [ebx + 0x192c], 1
cmp dword [ebx + 4], 2
jne 0x42052b
lea eax, [ebx + 0x1dd0]
lea ecx, [ebx + 0x1558]
push eax
push ecx
mov ecx, ebx
call fcn.0041fdfd
cmp dword [esi], edi
jne 0x4204f1
lea eax, [ebx + 0x1558]
push eax
push 0x110
lea eax, [ebx + 0x166c]
push eax
call fcn.0040486f
jmp 0x42051c
call fcn.00403f7e
push eax
lea ecx, [ebp - 0xc]
call fcn.0041e7f0
lea eax, [ebp - 0xc]
mov ecx, ebx
push eax
lea eax, [ebx + 0x166c]
push eax
call fcn.0041fdfd
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx - 0x10]
call fcn.004045f4
mov dword [ebx + 0x1928], 1
jmp 0x4206b9
cmp dword [ebx + 4], edi
jne 0x4206b9
lea ecx, [ebp - 0xb08]
call fcn.004018b5
lea ecx, [ebp - 0x6b0]
call fcn.004018b5
lea ecx, [ebp - 0x484]
call fcn.004018b5
lea ecx, [ebp - 0x258]
call fcn.004018b5
push 5
lea ecx, [ebp - 0xb08]
call fcn.0041f90e
push 0x27
lea ecx, [ebp - 0x6b0]
call fcn.0041f90e
push 0xe
lea ecx, [ebp - 0x484]
call fcn.0041f90e
push 0xd
lea ecx, [ebp - 0x258]
call fcn.0041f90e
lea ecx, [ebp - 0x8dc]
call fcn.004018b5
lea ecx, [ebp - 0x8dc]
call fcn.0041f95f
push dword [ebp - 0xafc]
mov esi, dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push str.MYDOCUMENTS
call esi
push dword [ebp - 0x6a4]
push str.MYPICTURES
call esi
push dword [ebp - 0x478]
push str.MYVIDEO
call esi
push dword [ebp - 0x24c]
push str.MYMUSIC
call esi
push dword [ebp - 0x8d0]
push str.SYSTEMDIR
call esi
lea eax, [ebx + 0x1dd0]
mov ecx, ebx
push eax
lea eax, [ebx + 0x1338]
push eax
call fcn.0041fdfd
lea eax, [ebx + 0x1224]
push eax
lea ecx, [ebp - 0x10]
call fcn.0041e84b
push eax
lea ecx, [ebp - 0xc]
call fcn.00404b15
lea eax, [ebp - 0xc]
lea esi, [ebx + 0x1dd4]
push eax
mov ecx, esi
call fcn.00401d96
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx - 0x10]
call fcn.004045f4
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.004045f4
push esi
call fcn.0041f478
mov eax, dword [esi]
pop ecx
cmp dword [eax - 0xc], edi
jne 0x420668
lea eax, [ebx + 0x191c]
mov ecx, esi
push eax
call fcn.00401d96
mov ecx, esi
call fcn.0041e2c8
cmp dword [ebx + 0x1448], edi
jne 0x420678
cmp dword [ebx + 0x144c], edi
je 0x420682
mov dword [ebx + 0x1928], 1
lea ecx, [ebp - 0x8dc]
call fcn.00401bbd
lea ecx, [ebp - 0x258]
call fcn.00401bbd
lea ecx, [ebp - 0x484]
call fcn.00401bbd
lea ecx, [ebp - 0x6b0]
call fcn.00401bbd
lea ecx, [ebp - 0xb08]
call fcn.00401bbd
cmp byte [ebx + 0x118], 0
je 0x4206cc
mov dword [ebx + 0x1924], 1
lea ecx, [ebp - 0x2c]
call fcn.00404b51
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.004045f4
jmp 0x4206ef
push 0x800402e0
mov ecx, ebx
call fcn.00420c69
mov edi, eax
pop esi
lea ecx, [ebp - 8]
call fcn.00404b51
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret