Function at 0x40b4cc
Capabilities:
Get disk information via ioctl
Read file on windows

Disassembly:
push ebp
mov eax, 0x129c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00484d70
mov ecx, 0x400
mov esi, str._vFAT
sub esp, eax
mov eax, dword [ebp + 0xc]
lea edi, [ebp - 0x1018]
mov dword [ebp - 0x1260], 0x5c3a53
mov dword [ebp - 0x1274], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1278], eax
xor eax, eax
cmp dword [ebp - 0x1278], 0
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x123c]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
jne 0x40b547
cmp dword [ebp - 0x1274], 0
jne 0x40b547
cmp dword [0x524a20], 0x9f
ja 0x40b547
mov dword [esp], str.ESP_toggling_is_only_available_for_Windows_10_or_later
call fcn.0043d9e0
jmp 0x40b571
xor edi, edi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040835f
mov dword [ebp - 0x126c], eax
inc eax
jne 0x40b578
xor ebx, ebx
jmp 0x40bcc4
lea eax, [ebp - 0x1268]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x14], 0x1000
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], esi
mov dword [esp + 4], 0x70050
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x40b5cb
cmp dword [ebp - 0x1268], 0
jne 0x40b5ec
call fcn.0043df77
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], str.Could_not_get_layout_for_drive_0x_02x:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x40b716
cmp dword [ebp - 0x1278], 0
mov ecx, dword [ebp - 0x1014]
jne 0x40b604
cmp dword [ebp - 0x1274], 0
je 0x40b60b
xor edi, edi
jmp 0x40b899
lea ebx, [ebp - 0xfc8]
xor edi, edi
cmp dword [ebp - 0x1014], edi
jle 0x40b64c
mov eax, dword [ebp - 0x1018]
test eax, eax
jne 0x40b633
cmp byte [ebx], 0xef
je 0x40b662
inc edi
add ebx, 0x90
jmp 0x40b613
dec eax
jne 0x40b62a
mov dword [esp + 4], 0x4c7dfc
mov dword [esp], ebx
call fcn.0043cd77
test eax, eax
je 0x40b62a
jmp 0x40b662
mov dword [ebp - 0x127c], 1
xor ecx, ecx
xor esi, esi
or edi, 0xffffffff
jmp 0x40b78d
cmp dword [ebp - 0x1018], 1
jne 0x40baac
imul ebx, edi, 0x90
mov dword [esp], str.ESP_name:__S
lea eax, [ebp + ebx - 0xfa0]
mov dword [esp + 4], eax
call fcn.0043d9e0
lea eax, [ebp + ebx - 0xfb8]
mov dword [ebp - 0x127c], eax
mov ebx, 1
lea esi, [ebp - 0x1218]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.ToggleEsp_02u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x10
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__snprintf_s]
mov eax, esi
mov byte [ebp - 0x1209], 0
call fcn.00408140
test eax, eax
jne 0x40baeb
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x127c]
mov dword [esp], eax
call fcn.0043e32e
mov edx, eax
lea eax, [ebp - 0x1218]
call fcn.00407e18
test eax, eax
jne 0x40b900
mov dword [esp], str.ESP_toggling_data_could_not_be_stored
call fcn.0043d9e0
xor ebx, ebx
jmp 0x40ba87
test edi, edi
jns 0x40b772
mov eax, dword [ebp - 0x1018]
cmp eax, 1
jne 0x40b7fd
mov ecx, ebx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x1280]
mov dword [ebp - 0x1284], ecx
mov dword [esp], eax
call fcn.0043cd77
mov ecx, dword [ebp - 0x1284]
test eax, eax
jne 0x40b836
inc dword [ebp - 0x1270]
add ebx, 0x90
mov eax, dword [ebp - 0x1270]
cmp dword [ebp - 0x1014], eax
jg 0x40b71d
inc dword [ebp - 0x127c]
cmp dword [ebp - 0x127c], 8
jg 0x40b8f0
test edi, edi
jns 0x40b943
mov eax, dword [ebp - 0x127c]
lea ebx, [ebp - 0x1218]
mov dword [ebp - 0x1284], ecx
mov dword [esp + 0xc], str.ToggleEsp_02u
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x10
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__snprintf_s]
mov eax, ebx
mov byte [ebp - 0x1209], 0
call fcn.00408140
mov dword [esp], eax
call fcn.0043e3f0
mov ecx, dword [ebp - 0x1284]
test eax, eax
mov dword [ebp - 0x1280], eax
je 0x40b772
xor eax, eax
lea ebx, [ebp - 0xfb8]
mov dword [ebp - 0x1270], eax
jmp 0x40b764
test eax, eax
jne 0x40b732
mov eax, dword [ebp - 0x1010]
mov edx, dword [ebx - 0x24]
lea ecx, [ebp - 0x125c]
mov dword [ebp - 0x125c], eax
xor eax, eax
mov dword [ebp - 0x1258], eax
mov eax, dword [ebx - 0x28]
mov dword [ebp - 0x1250], edx
mov dword [ebp - 0x1254], eax
jmp 0x40b732
mov eax, dword [ebp - 0x1018]
cmp eax, 1
jne 0x40b864
mov dword [ebx - 0x10], 0xc12a7328
mov word [ebx - 0xc], 0xf81f
mov word [ebx - 0xa], 0x11d2
mov dword [ebx - 8], 0xa0004bba
mov dword [ebx - 4], 0x3bc93ec9
jmp 0x40b868
test eax, eax
je 0x40b878
mov edi, dword [ebp - 0x1270]
mov esi, 1
jmp 0x40b758
mov byte [ebx - 0x10], 0xef
jmp 0x40b868
imul eax, edi, 0x90
lea esi, [ebp - 0xfe0]
lea edx, [eax + esi]
mov esi, dword [ebp - 0x1278]
cmp dword [edx + 4], esi
je 0x40b89f
inc edi
cmp edi, ecx
jl 0x40b87e
jmp 0x40b8f4
mov esi, dword [ebp - 0x1274]
cmp dword [edx], esi
jne 0x40b898
mov edx, dword [ebp - 0x1018]
cmp edx, 1
jne 0x40b8e2
mov dword [ebp + eax - 0xfc8], 0xc12a7328
mov dword [ebp + eax - 0xfc4], 0x11d2f81f
mov dword [ebp + eax - 0xfc0], 0xa0004bba
mov dword [ebp + eax - 0xfbc], 0x3bc93ec9
jmp 0x40b941
test edx, edx
jne 0x40b941
mov byte [ebp + eax - 0xfc8], 0xef
jmp 0x40b941
test edi, edi
jns 0x40b943
mov dword [esp], str.No_partition_to_toggle
jmp 0x40b711
mov eax, dword [ebp - 0x1018]
cmp eax, 1
jne 0x40bbb0
imul eax, edi, 0x90
mov dword [ebp + eax - 0xfc8], 0xebd0a0a2
mov dword [ebp + eax - 0xfc4], 0x4433b9e5
mov dword [ebp + eax - 0xfc0], 0xb668c087
mov dword [ebp + eax - 0xfbc], 0xc79926b7
xor esi, esi
imul edi, edi, 0x90
xor ecx, ecx
mov byte [ebp + edi - 0xfcc], 1
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov eax, dword [ebp - 0x1268]
mov dword [esp + 4], 0x7c054
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
jne 0x40b9af
call fcn.0043df77
mov dword [esp], str.Could_not_set_drive_layout:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x40b716
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call fcn.0040b472
cmp dword [ebp - 0x1278], 0
jne 0x40b9cf
cmp dword [ebp - 0x1274], 0
je 0x40b9d9
mov ebx, 1
jmp 0x40ba87
test esi, esi
je 0x40ba24
movzx eax, byte [ebp - 0x1270]
lea ebx, [ebp - 0x124c]
mov dword [esp + 0xc], str.ToggleEsp_02u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x10
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__snprintf_s]
mov edx, 0x495854
mov eax, ebx
mov byte [ebp - 0x123d], 0
call fcn.00407e18
jmp 0x40b9cf
movsx eax, byte [ebp - 0x1260]
mov dword [esp], eax
call fcn.0040a27a
test eax, eax
jne 0x40b9cf
xor edx, edx
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], edx
mov eax, dword [ebp + edi - 0xfe0]
mov edx, dword [ebp + edi - 0xfdc]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040853f
mov dword [esp + 4], eax
mov ebx, eax
lea eax, [ebp - 0x1260]
mov dword [esp], eax
call fcn.0040af78
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x40b9cf
mov eax, dword [ebp - 0x126c]
dec eax
cmp eax, 0xfffffffd
ja 0x40bcc4
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
jmp 0x40bcc4
mov eax, dword [ebp - 0x1010]
xor ecx, ecx
mov dword [ebp - 0x1258], ecx
mov dword [ebp - 0x125c], eax
imul eax, edi, 0x90
mov edx, dword [ebp + eax - 0xfdc]
mov eax, dword [ebp + eax - 0xfe0]
mov dword [ebp - 0x1250], edx
mov dword [ebp - 0x1254], eax
lea eax, [ebp - 0x125c]
jmp 0x40b693
cmp byte [eax], 0
je 0x40b6df
inc ebx
cmp ebx, 9
jne 0x40b69e
mov ebx, 1
lea ecx, [ebp - 0x1218]
mov dword [esp + 0x10], ebx
inc ebx
mov edx, dword [sym.imp.msvcrt.dll__snprintf_s]
lea esi, [ebp - 0x1208]
mov dword [esp], ecx
mov dword [esp + 0xc], str.ToggleEsp_02u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x10
mov dword [ebp - 0x1280], edx
call edx
mov byte [ebp - 0x1209], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.ToggleEsp_02u
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x10
mov dword [esp], esi
mov edx, dword [ebp - 0x1280]
call edx
mov eax, esi
mov byte [ebp - 0x11f9], 0
call fcn.00408140
lea ecx, [ebp - 0x1218]
mov edx, eax
mov eax, ecx
call fcn.00407e18
cmp ebx, 8
jne 0x40bb03
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x127c]
mov dword [esp], eax
call fcn.0043e32e
mov edx, eax
mov eax, esi
jmp 0x40b6fd
test eax, eax
jne 0x40b941
imul eax, edi, 0x90
xor edx, edx
mov byte [ebp + eax - 0xfc8], 0xb
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov edx, dword [ebp + eax - 0xfdc]
mov eax, dword [ebp + eax - 0xfe0]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x40b941
xor eax, eax
mov dword [esp + 8], 0x200
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1264]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1218]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x126c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x40b941
cmp dword [ebp - 0x1264], 0x200
jne 0x40b941
mov esi, 0x36
lea eax, [ebp - 0x1218]
lea edx, [ebp - 0x123b]
xor ebx, ebx
lea ecx, [eax + esi]
mov dword [esp + 4], edx
mov dword [esp + 8], 8
mov dword [ebp - 0x1280], edx
mov dword [esp], ecx
mov dword [ebp - 0x127c], ecx
call sub.msvcrt.dll_memcmp
mov ecx, dword [ebp - 0x127c]
mov edx, dword [ebp - 0x1280]
test eax, eax
jne 0x40bcab
imul eax, edi, 0x90
lea ebx, [ebx + ebx*8]
mov dl, byte [ebp + ebx - 0x123c]
mov byte [ebp + eax - 0xfc8], dl
jmp 0x40bcb4
inc ebx
add edx, 9
cmp ebx, 4
jne 0x40bc62
cmp esi, 0x52
je 0x40b941
mov esi, 0x52
jmp 0x40bc51
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret