Function at 0x417ac0
Capabilities:
Get disk information via ioctl
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov edi, dword [eax + 4]
mov dword [esp + 0x30], eax
mov ebx, dword [edi + 0x10]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x70], 0
mov dword [esp], ebx
mov dword [esp + 0x74], 0
call sub.msvcrt.dll_strlen
mov dword [esp + 0x38], eax
cmp eax, 0x29
jbe 0x417b23
mov dword [esp + 8], 0x1e
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], str._GLOBALROOTDeviceHarddisk
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x417b23
lea eax, [ebx + esi - 0xb]
cmp dword [eax], 0x7261505c
je 0x417b40
xor esi, esi
xor ebp, ebp
add esp, 0x9c
mov eax, esi
mov edx, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [eax + 4], 0x69746974
jne 0x417b23
cmp word [eax + 8], 0x6e6f
jne 0x417b23
cmp byte [eax + 0xa], 0x30
jne 0x417b23
xor eax, eax
mov ebx, 0x270
mov ebp, 4
xor esi, esi
mov dword [esp + 0x34], 0
lea esi, [esi]
lea ecx, [esp + 0x70]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x80], 0
call fcn.00427410
mov ecx, edx
or ecx, eax
jne 0x4180f0
mov eax, dword [esp + 0x70]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [edi + 0x14]
mov esi, dword [esp + 0x70]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
lea edx, [esp + 0x80]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x70050
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
sub esp, 0x20
test eax, eax
jne 0x417da0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
jne 0x417c50
cmp ebp, 0xfffff
ja 0x417da0
lea ebx, [ebp + ebp*8]
mov eax, dword [esp + 0x70]
add ebp, ebp
mov esi, ebx
shl ebx, 5
shl esi, 4
add ebx, 0x30
add esi, 0x30
jmp 0x417b70
mov ebx, eax
call esi
mov dword [esp + 0x18], 0
mov esi, eax
lea eax, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
sub esp, 0x1c
mov ebp, dword [esp + 0x88]
test ebp, ebp
je 0x417d90
sub eax, 2
mov dword [esp + 0x34], eax
mov edi, dword [fcn.004a1b90]
mov dword [esp], 2
call edi
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], ebp
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_issuing_IOCTL_DISK_GET_DRIVE_LAYOUT_EX_DeviceIoControl_for_getting_the_the_partition_table_data:_0x_08lX___.s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x88]
test eax, eax
je 0x417d3e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub esp, 4
mov esi, ebx
mov ebp, 2
mov eax, dword [esp + 0x74]
test eax, eax
je 0x417d65
lea ecx, [esp + 0x74]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0041d440
mov eax, dword [esp + 0x70]
test eax, eax
je 0x417b27
lea ecx, [esp + 0x70]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0041d440
add esp, 0x9c
mov eax, esi
mov edx, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, 0x4ab06a
jmp 0x417cb6
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x74]
mov dword [esp], 0
mov dword [esp + 8], edx
add eax, 0x14
mov dword [esp + 0x34], edx
mov dword [esp + 4], eax
mov dword [esp + 0x40], eax
call fcn.004270d0
mov esi, eax
mov eax, edx
mov ebp, edx
or eax, esi
jne 0x418254
mov eax, dword [esp + 0x38]
xor ebx, ebx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov eax, dword [edi + 0x20]
test eax, eax
je 0x417e2f
mov dword [esp + 0x44], esi
lea esi, [esi]
mov edx, dword [edi + 0x1c]
lea eax, [ebx + ebx*2]
add ebx, 1
lea esi, [eax*8]
mov eax, dword [edx + eax*8]
mov dword [esp], eax
call fcn.004155c0
add esi, dword [edi + 0x1c]
mov dword [esp], esi
call fcn.004152d0
cmp dword [edi + 0x20], ebx
ja 0x417e00
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x70]
mov dword [edi + 0x20], 0
mov ebx, dword [ecx + 4]
test ebx, ebx
je 0x4180d4
cmp dword [esp + 0x3c], 1
mov dword [esp + 0x3c], ebp
sbb eax, eax
xor ebx, ebx
and eax, 0xfffffffc
add eax, 4
mov dword [esp + 0x58], eax
lea eax, [edi + 0x1c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x38], edi
sub eax, 1
mov dword [esp + 0x50], eax
jmp 0x417e80
add ebx, 1
cmp dword [ecx + 4], ebx
jbe 0x4180d0
lea edi, [ebx + ebx*8]
mov dword [esp + 0x78], 0
shl edi, 4
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
lea eax, [ecx + edi]
mov dword [esp + 0x84], 0
mov edx, dword [eax + 0x48]
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
test edx, edx
je 0x417e74
mov edx, dword [eax + 0x44]
or edx, dword [eax + 0x40]
je 0x417e74
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
mov eax, dword [ecx + 0x20]
mov dword [esp + 0x10], edx
lea eax, [eax + eax*2 + 3]
shl eax, 3
mov dword [esp + 0xc], eax
sub eax, 0x18
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x1c]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.00427410
mov esi, eax
mov eax, edx
mov dword [esp + 0x3c], edx
or eax, esi
jne 0x418370
add edi, dword [esp + 0x70]
mov ebp, dword [esp + 0x38]
mov eax, dword [edi + 0x48]
lea edi, [esp + 0x78]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], str._.s_lu
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__snprintf]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xc], edi
mov eax, dword [ecx]
mov dword [esp + 8], eax
mov eax, dword [ecx + 8]
mov eax, dword [eax + 4]
and eax, 2
mov dword [esp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call fcn.00414f90
mov ecx, dword [esp + 0x70]
mov esi, eax
mov eax, edx
mov dword [esp + 0x3c], edx
or eax, esi
jne 0x417e74
mov edx, dword [esp + 0x78]
mov ecx, dword [edx]
jmp 0x417fa2
mov ecx, eax
mov eax, dword [ecx + 0xc]
test eax, eax
jne 0x417fa0
mov eax, dword [esp + 0x30]
mov esi, dword [ecx + 4]
mov dword [esp + 0x38], ebp
mov ebp, dword [esp + 0x38]
mov eax, dword [eax + 8]
mov dword [esi + 0x28], 1
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x418190
mov dword [esp + 4], 1
mov dword [esp], edx
call fcn.004153f0
mov ecx, edx
or ecx, eax
jne 0x4182e5
mov dword [esp + 0x38], ebp
mov ecx, eax
mov eax, edx
or eax, ecx
jne 0x4181b0
lea eax, [esp + 0x7c]
mov dword [esi + 0x28], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.004159d0
mov esi, eax
mov eax, edx
or eax, esi
je 0x418305
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov ecx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], ecx
call ecx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_getting_sector_size_for_partition_entry__Iu:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ecx, dword [esp + 0x3c]
mov dword [esp], 2
call ecx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
mov ecx, dword [esp + 0x3c]
call ecx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], edi
xor esi, esi
call fcn.004152d0
mov dword [esp + 0x3c], 0
mov ecx, dword [esp + 0x70]
jmp 0x417e74
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x74]
test eax, eax
jne 0x417d55
mov eax, ecx
jmp 0x417d71
mov dword [esp + 4], edx
mov ebp, edx
mov dword [esp], eax
mov dword [esp + 0x30], esi
mov esi, eax
call fcn.0041d490
mov dword [esp], 2
mov edi, dword [fcn.004a1b90]
mov dword [esp + 0x34], eax
call edi
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_expanding_layout_allocation_from__Iu_to__Iu_bytes:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call edi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call edi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x417d45
mov dword [esp + 0x38], ebp
mov edx, dword [esp + 0x78]
nop
mov dword [esi + 0x28], 0
mov dword [esp + 4], 1
mov dword [esp], edx
call fcn.004153f0
mov ecx, eax
jmp 0x417ff5
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 0x54], ecx
call fcn.0041d490
mov edx, dword [esp + 0x38]
mov ebp, dword [fcn.004a1b90]
mov dword [esp + 0x3c], eax
mov edx, dword [edx + 0x20]
mov dword [esp], 2
mov dword [esp + 0x48], edx
call ebp
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_opening_alternate_device__Iu:__lu___s_
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebp
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebp
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esi + 0x28], 0
jmp 0x4180b3
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov edi, dword [edi + 0x10]
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x30], eax
call ebx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x40]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_allocating__Iu_bytes_for_temporary_partition_name_buffer__whole_device_name:___s__:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x417d45
mov dword [esp], 2
call fcn.004a15f0
sub dword [esp + 0x3c], 1
je 0x418186
mov edx, dword [esp + 0x78]
jmp 0x417fd5
lea eax, [esp + 0x80]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.00415830
mov esi, eax
mov eax, edx
or eax, esi
je 0x4183c8
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov ecx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], ecx
call ecx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_getting_partition_start_sector_size_for_partition_entry__Iu:__lu___s_
jmp 0x418069
mov dword [esp + 4], edx
mov edi, dword [esp + 0x38]
mov ebp, edx
mov dword [esp], esi
call fcn.0041d490
mov ebx, dword [edi + 0x20]
mov dword [esp], 2
mov dword [esp + 0x30], eax
mov edi, dword [fcn.004a1b90]
call edi
mov edx, dword [esp + 0x30]
add ebx, 1
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_reallocating_alternate_devices_list_to__Iu_elements:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x418147
lea eax, [esp + 0x88]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.00415640
mov esi, eax
mov eax, edx
mov dword [esp + 0x3c], edx
or eax, esi
jne 0x41857b
mov ecx, dword [esp + 0x70]
lea eax, [ebx + ebx*8]
shl eax, 4
add eax, ecx
mov edx, dword [eax + 0x38]
mov ebp, dword [eax + 0x3c]
mov dword [esp + 0x60], edx
mov edx, dword [eax + 0x40]
mov eax, dword [eax + 0x44]
mov dword [esp + 0x54], ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x64], edx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x7c]
imul ebp, eax
mul dword [esp + 0x80]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x4c], edx
add dword [esp + 0x4c], ebp
test eax, eax
js 0x4184d5
mov ebp, dword [esp + 0x5c]
test ebp, ebp
js 0x4184d5
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x54]
xor eax, dword [esp + 0x48]
xor edx, dword [esp + 0x4c]
or edx, eax
jne 0x4184d5
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
xor eax, dword [esp + 0x64]
xor edx, ebp
or edx, eax
jne 0x4184d5
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x4c]
mov edi, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
lea edx, [edi + edi*2]
mov dword [esp + 0x54], edi
mov edi, dword [esp + 0x48]
lea eax, [eax + edx*8]
mov edx, dword [esp + 0x78]
mov dword [eax + 8], edi
mov edi, dword [esp + 0x64]
mov dword [eax], edx
mov dword [eax + 0x10], edi
mov edi, dword [esp + 0x5c]
mov dword [eax + 0xc], ebp
mov dword [eax + 0x14], edi
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x38]
add edi, 1
mov dword [eax + 0x20], edi
jmp 0x417e74
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
call esi
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x48]
mov dword [esp + 8], 0x4ab32a
mov dword [esp + 4], str.__s__Ignoring_partition_with_mismatching_offset_length._Partition_entry:_offset_I64d_length_I64d_Device_ioctls:_offset_I64u_length_I64u
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4aaeff
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x4180b3
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov ecx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], ecx
call ecx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x4aaea0
mov dword [esp + 4], str.__s__Error_while_getting_partition_size_for_partition_entry__Iu:__lu___s_
jmp 0x418069