Function at 0x4001f9fa
Capabilities:
Get disk size
Get memory capacity
Query environment variable
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x474
mov eax, dword [0x40026d24]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x470], eax
mov ecx, dword [ebp + 0xc]
mov esi, edx
push ecx
mov dword [ebp - 0x474], ecx
mov ecx, edi
push eax
call fcn.400201d3
test eax, eax
je 0x4001fa3d
xor eax, eax
inc eax
jmp 0x400201bc
mov ebx, 0xe00
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x468], eax
test eax, eax
je 0x400201bc
cmp esi, ebx
ja 0x40020087
push esi
push edi
push eax
call sub.msvcrt.dll_memcpy
lea eax, [esi + 8]
mov ecx, ebx
and eax, 0xfffffff8
add esp, 0xc
cmp eax, ecx
jbe 0x4001fa86
xor ebx, ebx
jmp 0x40020087
mov edi, dword [ebp - 0x468]
sub ebx, eax
add edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 8
pop esi
mov dword [edi], eax
cmp ebx, esi
jb 0x4001fa7f
add edi, esi
sub ebx, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
cmp ebx, esi
jb 0x4001fa7f
add edi, esi
sub ebx, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi], eax
cmp ebx, esi
jb 0x4001fa7f
sub ebx, esi
add edi, esi
cmp ebx, 0x10
jb 0x40020087
push edi
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x18
pop esi
cmp ebx, esi
jb 0x4001fa7f
sub ebx, esi
add edi, esi
cmp ebx, 8
jb 0x40020087
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp ebx, 0x10
jb 0x4001fa7f
push 0x40
sub ebx, 0x10
add edi, 0x10
pop eax
cmp ebx, eax
jb 0x40020087
push edi
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp ebx, 0x48
jb 0x4001fa7f
sub ebx, 0x48
add edi, 0x48
cmp ebx, 0x10
jb 0x40020087
lea eax, [edi + 0xc]
push eax
lea eax, [edi + 8]
push eax
lea eax, [edi + 4]
push eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
cmp ebx, esi
jb 0x4001fa7f
add edi, esi
sub ebx, esi
cmp dword [0x40027160], 0
mov dword [ebp - 0x464], edi
mov dword [ebp - 0x46c], ebx
jne 0x4001fc2a
xor ecx, ecx
mov dword [ebp - 0x460], ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov dword [ebp - 0x45c], eax
test eax, eax
jne 0x4001fb94
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ecx, ecx
mov dword [ebp - 0x45c], eax
inc ecx
mov dword [ebp - 0x460], ecx
test eax, eax
je 0x4001fc20
lea ecx, [ebp - 0x110]
call fcn.40021020
mov ebx, dword [ebp - 0x460]
mov edi, eax
xor esi, esi
add edi, esi
push 0x7fff
test ebx, ebx
jne 0x4001fbc4
add edi, 2
push edi
call dword [sym.imp.msvcrt.dll_wcsnlen]
mov esi, eax
add esi, esi
jmp 0x4001fbce
inc edi
push edi
call dword [sym.imp.msvcrt.dll_strnlen]
mov esi, eax
pop ecx
pop ecx
push esi
mov edx, edi
lea ecx, [ebp - 0x110]
call fcn.40046f91
test esi, esi
jne 0x4001fba9
lea ecx, [ebp - 0x110]
call fcn.40021160
push dword [ebp - 0x45c]
mov edi, 0x400272d8
lea esi, [ebp - 0xb8]
test ebx, ebx
mov ebx, dword [ebp - 0x46c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jne 0x4001fc14
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x4001fc1a
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov edi, dword [ebp - 0x464]
mov dword [0x40027160], 1
cmp ebx, 0x10
jb 0x40020087
mov esi, 0x400272d8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp ebx, 0x18
jb 0x4001fa7f
mov edi, dword [ebp - 0x464]
sub ebx, 0x18
add edi, 0x18
call fcn.400202c5
test eax, eax
je 0x40020087
cmp ebx, 0x40
jb 0x40020087
mov esi, dword [0x40027368]
test esi, esi
je 0x40020087
push 0
push ebx
push edi
push 5
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
lea ecx, [ebp - 0x170]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x170]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x170]
call fcn.40020f50
sub ebx, 0x18
add edi, 0x18
cmp ebx, 0x30
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x30
push edi
push 3
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fd06
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
sub ebx, eax
add edi, eax
cmp ebx, 0x18
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x18
push edi
push 7
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fd3e
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
add edi, eax
sub ebx, eax
cmp ebx, 0x58
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x58
push edi
push 0x50
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fd88
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
sub ebx, eax
add edi, eax
cmp ebx, 0x24
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x24
push edi
push 0x15
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fdc0
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
add edi, eax
sub ebx, eax
mov ecx, 0x158
cmp ebx, ecx
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ecx
push edi
push 2
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fe0d
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
sub ebx, eax
add edi, eax
cmp ebx, 0x10
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x10
push edi
push 0x21
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fe45
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
add edi, eax
sub ebx, eax
cmp ebx, 0x20
jb 0x40020087
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push 0x20
push edi
push 0x2d
mov ecx, esi
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001fe86
mov eax, dword [ebp - 0x45c]
add eax, 8
and eax, 0xfffffff8
cmp eax, ebx
ja 0x4001fa7f
add edi, eax
sub ebx, eax
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ebx
push edi
push 8
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001feee
cmp ebx, 0x14
jb 0x40020087
lea ecx, [ebp - 0x1d0]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x1d0]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x1d0]
call fcn.40020f50
cmp ebx, 0x18
jb 0x4001fa7f
add edi, 0x18
sub ebx, 0x18
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ebx
push edi
push 0x3d
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001ff56
cmp ebx, 0x14
jb 0x40020087
lea ecx, [ebp - 0x230]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x230]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x230]
call fcn.40020f50
cmp ebx, 0x18
jb 0x4001fa7f
add edi, 0x18
sub ebx, 0x18
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ebx
push edi
push 0x12
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
test eax, eax
js 0x4001ffbe
cmp ebx, 0x14
jb 0x40020087
lea ecx, [ebp - 0x290]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x290]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x290]
call fcn.40020f50
cmp ebx, 0x18
jb 0x4001fa7f
add edi, 0x18
sub ebx, 0x18
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ebx
push edi
push 0x17
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
test eax, eax
js 0x40020026
cmp ebx, 0x14
jb 0x40020087
lea ecx, [ebp - 0x2f0]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x2f0]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x2f0]
call fcn.40020f50
cmp ebx, 0x18
jb 0x4001fa7f
add edi, 0x18
sub ebx, 0x18
mov esi, dword [0x40027368]
lea eax, [ebp - 0x45c]
push eax
push ebx
push edi
push 0x2a
mov ecx, esi
mov dword [ebp - 0x45c], ebx
call dword [0x400282b0]
call esi
test eax, eax
js 0x40020087
cmp ebx, 0x14
jb 0x40020087
lea ecx, [ebp - 0x350]
call fcn.40020d60
push dword [ebp - 0x45c]
mov edx, edi
lea ecx, [ebp - 0x350]
call fcn.40020e20
mov edx, edi
lea ecx, [ebp - 0x350]
call fcn.40020f50
cmp ebx, 0x18
jb 0x4001fa7f
sub ebx, 0x18
push 0x14
pop ecx
lea eax, [ebp - 0x58]
mov esi, 0x40027168
push eax
push 0x50
lea eax, [ebp - 0x458]
lea edi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.400221bd
mov edx, 0xe00
sub edx, ebx
mov ebx, 0xe00
cmp edx, ebx
jbe 0x400200b8
mov edx, ebx
mov ecx, dword [ebp - 0x468]
lea eax, [ebp - 0x58]
push eax
call fcn.400206c0
push 0x14
pop ecx
push 0x14
lea esi, [ebp - 0x58]
mov dword [ebp - 0x46c], eax
lea edi, [ebp - 0xa8]
rep movsd dword es:[edi], dword [esi]
pop ecx
lea eax, [ebp - 0xa8]
mov edi, 0x40027168
push eax
push 0x50
lea esi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
pop esi
push esi
lea eax, [ebp - 0x458]
push eax
call fcn.40022070
push 2
lea edx, [ebp - 0x460]
pop ecx
call fcn.400203fb
test eax, eax
je 0x4002013a
push esi
lea eax, [ebp - 0xa8]
push eax
push 3
push 0
push 0x400052c8
push dword [ebp - 0x460]
call dword [sym.imp.KERNEL32.dll_RegSetValueExW]
push dword [ebp - 0x460]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, esi
lea eax, [ebp - 0xa8]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x40020142
lea eax, [ebp - 0x58]
push eax
push esi
lea eax, [ebp - 0x458]
push eax
call fcn.400221bd
lea eax, [ebp - 0x58]
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x4002015f
mov eax, dword [ebp - 0x474]
push dword [ebp - 0x470]
push dword [eax]
lea eax, [ebp - 0x458]
push eax
call fcn.40022070
mov ecx, 0x102
lea eax, [ebp - 0x458]
xor edx, edx
mov byte [eax], dl
inc eax
sub ecx, 1
jne 0x4002018f
mov ecx, dword [ebp - 0x468]
mov eax, ecx
mov byte [eax], dl
inc eax
sub ebx, 1
jne 0x4002019f
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x46c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.40021790
leave
ret 8