Function at 0x40d180
Capabilities:
Get disk size

Disassembly:
sub esp, 0x18
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 8], ebx
je 0x40d19b
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x18
ret
lea esi, [edi + 0x5cf20]
mov dword [esp + 0x1c], ebx
push esi
mov dword [esp + 0x24], ebx
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
add eax, 0x41
push ebx
mov word [esp + 0x18], ax
lea eax, [esp + 0x20]
push ebx
lea ecx, [esp + 0x1c]
push eax
push ecx
mov word [esp + 0x26], 0x3a
mov word [esp + 0x28], 0x5c
mov word [esp + 0x2a], bx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40d465
mov eax, dword [edi + 0x5cf10]
mov ecx, dword [edi + 0x5cf14]
cmp eax, 0xffffffff
jne 0x40d1fa
cmp ecx, eax
je 0x40d21f
mov edx, dword [esp + 0x20]
cmp edx, ecx
ja 0x40d21f
jb 0x40d20c
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
ja 0x40d21f
mov dword [edi + 0x2464], 2
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret
push ebx
push 0x20
push 4
push ebx
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [edi + 8], eax
je 0x40d45b
mov eax, dword [edi + 0x26e4]
push ebp
cmp eax, ebx
je 0x40d44e
mov edx, dword [edi + 0x26dc]
lea esi, [edi + 0x26d4]
mov eax, edx
mov ecx, dword [esi + 4]
cmp eax, edx
je 0x40d271
mov ebp, dword [eax]
add eax, 4
mov dword [ecx], ebp
add ecx, 4
cmp eax, edx
jne 0x40d263
mov edx, dword [esi + 8]
mov dword [esi + 8], ecx
mov ecx, edi
mov dword [esp + 0x14], edx
call fcn.0040d710
test eax, eax
jne 0x40d44e
cmp dword [edi + 0x245c], ebx
ja 0x40d29c
mov dword [edi + 0x245c], 5
mov ecx, dword [edi + 0x245c]
mov eax, 0xa
cmp ecx, eax
jbe 0x40d2b1
mov dword [edi + 0x245c], eax
mov eax, dword [edi + 0x5cf10]
mov ecx, dword [edi + 0x5cf14]
sub eax, 1
mov dword [edi + 0x5cdd0], ebx
sbb ecx, ebx
mov dword [edi + 0x5cdd8], eax
mov dword [edi + 0x5cdd4], ebx
mov dword [edi + 0x5cddc], ecx
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
add edi, 0x5cdc8
sar edx, 2
mov dword [esp + 0x10], edi
cmp edx, 1
mov edi, eax
jae 0x40d3aa
mov edx, dword [esi + 4]
cmp edx, ebx
je 0x40d30d
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
ja 0x40d312
mov ecx, 1
cmp edx, ebx
jne 0x40d31a
xor eax, eax
jmp 0x40d31f
sub eax, edx
sar eax, 2
add eax, ecx
cmp eax, ebx
mov dword [esp + 0x14], eax
jge 0x40d32b
xor eax, eax
shl eax, 2
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 4]
add esp, 4
mov ebx, eax
push ebx
push edi
push ecx
mov ecx, esi
call fcn.0040eae0
lea edx, [esp + 0x10]
mov ebp, eax
push edx
push 1
push ebp
mov ecx, esi
call fcn.0040eb10
mov eax, dword [esi + 8]
add ebp, 4
push ebp
push eax
push edi
mov ecx, esi
call fcn.0040eae0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00421dd0
mov eax, dword [esi + 4]
push eax
call fcn.0044737a
mov ecx, dword [esp + 0x18]
add esp, 4
lea edx, [ebx + ecx*4]
mov ecx, esi
mov dword [esi + 0xc], edx
call fcn.00414da0
lea eax, [ebx + eax*4 + 4]
pop ebp
mov dword [esi + 8], eax
mov dword [esi + 4], ebx
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x18
ret
mov ecx, eax
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x40d40e
lea edx, [edi + 4]
mov ecx, esi
push edx
push eax
push edi
call fcn.0040eae0
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
mov edx, eax
push ecx
sub edx, edi
mov ecx, 1
sar edx, 2
sub ecx, edx
push ecx
push eax
mov ecx, esi
call fcn.0040eb10
mov ecx, dword [esi + 8]
mov eax, edi
cmp edi, ecx
je 0x40d44a
mov edx, dword [esp + 0x10]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x40d3eb
mov eax, dword [esi + 8]
pop ebp
add eax, 4
pop edi
mov dword [esi + 8], eax
pop esi
mov eax, 1
pop ebx
add esp, 0x18
ret
push eax
push eax
add eax, 0xfffffffc
mov ecx, esi
push eax
call fcn.0040eae0
mov ecx, dword [esi + 8]
lea eax, [ecx - 4]
cmp edi, eax
je 0x40d434
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, edi
mov dword [ecx], edx
jne 0x40d425
lea ecx, [edi + 4]
mov eax, edi
cmp edi, ecx
je 0x40d44a
mov edx, dword [esp + 0x10]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x40d43d
add dword [esi + 8], 4
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x18
ret
mov dword [edi + 0x2464], 3
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret