Function at 0x418750
Capabilities:
Get disk information
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x60
mov eax, dword [0x427008]
xor eax, esp
mov dword [esp + 0x5c], eax
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
cmp dword [eax + 0x14], 8
jb 0x418773
mov eax, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0xa0000000
push 3
push 0
push 1
push 0xc0000000
push eax
call edi
mov ecx, dword [esi + 4]
mov dword [ecx + 0x20], eax
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 0x20]
cmp eax, 0xffffffff
jne 0x4187e9
mov eax, dword [ecx + 0x18]
or eax, dword [ecx + 0x1c]
je 0x4187cd
cmp dword [ecx + 0x14], 8
jb 0x4187af
mov ecx, dword [ecx]
push 0
push 0xa0000000
push 1
push 0
push 1
push 0xc0000000
push ecx
call edi
mov ecx, dword [esi + 4]
mov dword [ecx + 0x20], eax
mov ecx, dword [esi + 4]
cmp dword [ecx + 0x20], 0xffffffff
jne 0x41880c
mov eax, 2
pop edi
pop esi
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.0041c61b
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esp + 0x28]
mov eax, ecx
mov edx, dword [esp + 0x2c]
or eax, edx
je 0x41880c
mov eax, dword [esi + 4]
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], edx
mov ecx, dword [esi + 4]
mov edi, 3
mov dword [esp + 0xc], 0
mov edx, edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 7
cmp dword [ecx + 0x10], edx
cmovb edx, dword [ecx + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x41883d
mov ecx, dword [ecx]
push edx
push ecx
lea ecx, [esp + 0x14]
call fcn.0040de20
cmp dword [esp + 0x20], 8
lea ecx, [esp + 0x24]
push 0x104
push 0
push ecx
push 0
push 0
push 0x104
lea eax, [esp + 0x24]
cmovae eax, dword [esp + 0x24]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov edx, dword [esp + 0x20]
cmp edx, 8
jb 0x4188b2
mov ecx, dword [esp + 0xc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4188a8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4188a8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041c8aa
add esp, 8
test byte [esp + 0x24], 0x40
mov ecx, dword [esi + 4]
jne 0x41894f
mov dword [esp + 0xc], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 7
cmp dword [ecx + 0x10], edi
cmovb edi, dword [ecx + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x4188e7
mov ecx, dword [ecx]
push edi
push ecx
lea ecx, [esp + 0x14]
call fcn.0040de20
cmp dword [esp + 0x20], 8
lea eax, [esp + 0xc]
cmovae eax, dword [esp + 0xc]
push eax
push 0x4242c0
call fcn.0040d690
mov edx, dword [esp + 0x28]
add esp, 8
cmp edx, 8
jb 0x4189a4
mov ecx, dword [esp + 0xc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x418946
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x418946
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041c8aa
jmp 0x4189a1
lea eax, [esp + 0x30]
push eax
push dword [ecx + 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test dword [esp + 0x30], 0x200
jne 0x4189a4
push 0
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esi + 4]
push 0
push 0
push 0
push 0
push 0x900c4
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4189a4
mov eax, dword [esi + 4]
cmp dword [eax + 0x14], 8
jb 0x418996
mov eax, dword [eax]
push eax
push str.Failed_to_make_image_file_sparse:__s_n
call fcn.0040d690
add esp, 8
mov ecx, dword [esp + 0x64]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0041c61b
mov esp, ebp
pop ebp
ret