Function at 0x401210
Capabilities:
Get disk information via ioctl
Unmount volume via ioctl
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x47c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push 0
push 0x147
push dword [0x40fc20]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0xffffffff
jne 0x401263
push 0
push str.Status
push str.No_device_selected
push dword [0x40fc2c]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401990
mov esp, ebp
pop ebp
ret
movsx eax, byte [eax*4 + 0x40fde8]
push esi
push eax
push str.._c:
lea eax, [ebp - 0x68]
push 0x63
push eax
call fcn.0040199f
add esp, 0x10
lea eax, [ebp - 0x68]
push 0
push 0
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40131d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [ebp - 0x47c]
push ecx
push 0x400
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [ebp - 0x47c]
lea eax, [ebp - 0x468]
push str.Error_opening_USB_Flash_volume
push str._s:__s
push 0x400
push eax
call fcn.0040199f
add esp, 0x14
push dword [ebp - 0x47c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push str.Error
lea eax, [ebp - 0x468]
push eax
push dword [0x40fc2c]
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401990
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [ebp - 0x46c]
push eax
push 0
push 0
push 0
push 0
push 0x90018
push esi
call edi
test eax, eax
jne 0x401353
lea edx, [eax + 1]
mov ecx, str.Error_locking_volume
call fcn.00401170
jmp 0x401463
push 0
lea eax, [ebp - 0x46c]
push eax
push 0
push 0
push 0
push 0
push 0x90020
push esi
call edi
test eax, eax
jne 0x401382
lea edx, [eax + 1]
mov ecx, str.Error_dismounting_volume
call fcn.00401170
jmp 0x401463
push 0
lea eax, [ebp - 0x46c]
push eax
push 0xc
lea eax, [ebp - 0x478]
push eax
push 0
push 0
push 0x2d1080
push esi
call edi
test eax, eax
jne 0x4013b6
lea edx, [eax + 1]
mov ecx, str.Error_getting_disk_number
call fcn.00401170
jmp 0x401463
push dword [ebp - 0x474]
lea eax, [ebp - 0x68]
push str..PhysicalDrive_d
push 0x63
push eax
call fcn.0040199f
add esp, 0x10
lea eax, [ebp - 0x68]
push 0
push 0
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401400
mov edx, 1
mov ecx, str.Error_opening_flash_device
call fcn.00401170
jmp 0x401463
push 0
lea eax, [ebp - 0x46c]
push eax
push dword [0x40fe68]
push dword [0x40fde4]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40142f
lea edx, [eax + 1]
mov ecx, str.Error_writing_to_flash
call fcn.00401170
jmp 0x40145c
mov eax, dword [ebp - 0x46c]
push 0
push str.Status
cmp eax, dword [0x40fe68]
jne 0x40144b
push str.Phytune_Image_Written
jmp 0x401450
push str.Short_image_write_
push dword [0x40fc2c]
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00401990
mov esp, ebp
pop ebp
ret