Function at 0x40e256
Capabilities:
Get disk size

Disassembly:
mov eax, 0x46039c
call fcn.0043c274
sub esp, 0x424
push ebx
push esi
push edi
xor esi, esi
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x226]
mov word [ebp - 0x228], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x10], esi
cmp dword [0x476dcc], 0xffffffff
mov dword [ebp - 4], esi
jne 0x40e2b8
push dword [0x476dc8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, esi
je 0x40e2a5
mov dword [ebp - 0x10], eax
push 0x476dd8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x476dcc], eax
mov eax, dword [ebp + 8]
mov cx, word [eax]
cmp cx, 0x5c
jne 0x40e2ec
cmp word [eax + 2], cx
jne 0x40e2ec
push eax
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x228]
push 0x4764a4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x40e30e
mov ax, word [eax + 2]
mov word [ebp - 0x430], cx
mov word [ebp - 0x42e], ax
mov word [ebp - 0x42c], 0x5c
mov word [ebp - 0x42a], si
mov ecx, dword [0x476dcc]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
cmp ecx, esi
mov esi, dword [ebp + 0x14]
je 0x40e356
cmp word [ebp - 0x228], 0
lea eax, [ebp - 0x228]
jne 0x40e337
lea eax, [ebp - 0x430]
push esi
push edi
push ebx
push eax
call ecx
test eax, eax
mov dword [ebp + 8], eax
jne 0x40e3a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40e3a1
and dword [0x476dcc], 0
cmp word [ebp - 0x228], 0
je 0x40e40a
lea eax, [ebp - 0x430]
push 0x104
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.0040e4aa
add esp, 0xc
test eax, eax
jne 0x40e40a
cmp dword [ebp - 0x10], eax
je 0x40e39a
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x40e39a
push dword [ebp - 0x10]
call eax
xor eax, eax
jmp 0x40e49b
cmp word [ebp - 0x228], 0
lea eax, [ebp - 0x228]
jne 0x40e3b7
lea eax, [ebp - 0x430]
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x40e3de
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0x18]
imul ecx, dword [ebp - 0x18]
mov dword [edx], ecx
cmp dword [ebp + 8], 0
je 0x40e3ed
test eax, eax
je 0x40e3ed
push 1
pop esi
jmp 0x40e3ef
xor esi, esi
cmp dword [ebp - 0x10], 0
je 0x40e403
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x40e403
push dword [ebp - 0x10]
call eax
mov eax, esi
jmp 0x40e49b
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x40e46d
push dword [ebp - 0x1c]
and dword [edi + 4], 0
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call fcn.0040e548
push dword [ebp - 0x20]
mov dword [edi], eax
and dword [esi + 4], 0
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call fcn.0040e548
mov dword [esi], eax
mov dword [ebx], eax
mov eax, dword [esi + 4]
add esp, 0x18
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x14]
imul eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
cmp word [ebp - 0x228], 0
je 0x40e484
lea eax, [ebp - 0x430]
push eax
call fcn.0040e571
pop ecx
cmp dword [ebp - 0x10], 0
je 0x40e498
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x40e498
push dword [ebp - 0x10]
call eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret