Function at 0x1004eb5
Capabilities:
Read file on windows
Unmount volume via ioctl
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x10]
xor ebx, ebx
push edi
mov edi, eax
cmp eax, ebx
jne 0x1004ed1
mov edi, dword [esi + 0x14]
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x1004eef
push eax
call fcn.01006421
push edi
push eax
push 0x1011
call fcn.0100593f
add esp, 0xc
jmp 0x1004efc
push edi
push 0x1012
call fcn.0100593f
pop ecx
pop ecx
push 0x101d
call fcn.0100593f
mov esi, dword [esi + 0x14]
pop ecx
push esi
lea eax, [ebp - 0x3c]
mov dword [ebp + 8], esi
mov esi, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push eax
call esi
mov edi, dword [sym.imp.ntdll.dll_NtOpenFile]
push 0x2a
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x54], eax
push 7
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x5c]
push eax
push 0xc0100080
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x5c], 0x18
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], 0x40
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jge 0x1004f7a
push 0x1013
call fcn.0100593f
pop ecx
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call fcn.01005990
jmp 0x1005316
lea eax, [ebp - 0x24]
push eax
push 0x10012fc
push 0x100120c
push dword [ebp + 8]
call fcn.0100635c
cmp eax, ebx
mov dword [ebp - 8], eax
jge 0x1004fb6
push 0x1014
call fcn.0100593f
pop ecx
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call fcn.01005990
jmp 0x1005302
push dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
push eax
call esi
push 0x4021
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x54], eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x5c]
push eax
push 0x100000
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x5c], 0x18
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], 0x40
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
call edi
push dword [ebp - 0x24]
mov dword [ebp - 8], eax
call fcn.010057e4
cmp dword [ebp - 8], ebx
jge 0x100500c
push 0x1015
jmp 0x1004f9c
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
call fcn.01004b4e
push dword [ebp - 0x28]
mov dword [ebp - 8], eax
call dword [sym.imp.ntdll.dll_NtClose]
cmp dword [ebp - 8], ebx
jge 0x1005037
push 0x1016
jmp 0x1004f9c
mov eax, dword [ebp - 0x14]
sub eax, ebx
je 0x100507d
dec eax
je 0x100506c
dec eax
je 0x100505b
push 0x1017
call fcn.0100593f
pop ecx
mov dword [ebp - 8], 0xc0000001
jmp 0x1005302
mov eax, dword [0x1015bc0]
mov eax, dword [eax + 8]
mov dword [ebp - 8], 0x2000
jmp 0x100508b
mov eax, dword [0x1015bc0]
mov eax, dword [eax + 4]
mov dword [ebp - 8], 0x600
jmp 0x100508b
mov eax, dword [0x1015bc0]
mov eax, dword [eax]
mov dword [ebp - 8], 0x200
mov ecx, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
xor edx, edx
mov eax, ecx
div edi
mov dword [ebp - 0x20], ecx
cmp edx, ebx
je 0x10050aa
mov eax, ecx
sub eax, edx
add eax, edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, edi
push eax
call fcn.010057bf
mov esi, eax
mov dword [ebp - 0x34], esi
cmp esi, ebx
jne 0x10050d5
push 0x1018
call fcn.0100593f
pop ecx
mov dword [ebp - 8], 0xc000009a
jmp 0x1005302
push ebx
push edi
push ebx
push esi
call fcn.01006930
cmp eax, ebx
je 0x10050e6
sub esi, eax
add esi, edi
push 0x90018
push dword [ebp - 0xc]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov byte [ebp + 0xb], bl
mov byte [ebp - 2], bl
mov byte [ebp - 1], bl
call fcn.01004c15
cmp eax, ebx
jge 0x1005118
cmp byte [ebp + 0xc], bl
jne 0x1005114
mov byte [ebp - 1], 1
mov dword [ebp - 0x2c], eax
jmp 0x100514f
mov byte [ebp + 0xb], 1
push 0x90020
push dword [ebp - 0xc]
call fcn.01004c15
cmp eax, ebx
jge 0x1005132
mov byte [ebp - 2], 1
mov dword [ebp - 0x30], eax
jmp 0x100514f
cmp byte [ebp + 0xb], 1
jne 0x100514f
push 0x101e
call fcn.0100593f
mov dword [esp], 0x101d
call fcn.0100593f
pop ecx
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call edi
cmp eax, 0xffffffff
jne 0x100516c
push 0x1019
jmp 0x10052ca
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10052c5
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x10], eax
jne 0x10052c5
xor eax, eax
cmp dword [ebp - 0x14], ebx
jl 0x10051c0
cmp dword [ebp - 0x14], 1
jle 0x10051ba
cmp dword [ebp - 0x14], 2
jne 0x10051c0
cmp dword [0x1015bc0], 0x1011a00
push 0x54
pop eax
je 0x10051c0
mov byte [esi + 0x24], 0x80
jmp 0x10051c0
movzx eax, byte [esi + 1]
inc eax
inc eax
mov ecx, dword [ebp - 8]
sub ecx, eax
push ecx
mov ecx, dword [ebp - 0x1c]
add ecx, eax
push ecx
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call edi
cmp eax, 0xffffffff
je 0x1005162
cmp dword [ebp - 0x14], 1
push ebx
lea eax, [ebp - 0x10]
push eax
je 0x1005202
mov edi, dword [ebp - 0x20]
jmp 0x1005243
push 0x101b
jmp 0x10052ca
push 0x200
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10051f8
cmp dword [ebp - 0x10], 0x200
jne 0x10051f8
push ebx
push ebx
push 0x1800
push dword [ebp - 0xc]
call edi
cmp eax, 0xffffffff
je 0x1005162
push ebx
lea eax, [ebp - 0x10]
push eax
mov edi, 0x200
add esi, 0x400
push edi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10051f8
cmp dword [ebp - 0x10], edi
jne 0x10051f8
mov eax, dword [ebp - 0x14]
xor ecx, ecx
sub eax, ebx
mov dword [ebp - 8], ebx
je 0x1005277
dec eax
je 0x1005270
dec eax
jne 0x100527c
mov ecx, 0x10012dc
jmp 0x100527c
mov ecx, 0x10012e8
jmp 0x100527c
mov ecx, 0x10012f4
cmp byte [ebp - 1], 1
push ecx
jne 0x1005294
push 0x101f
call fcn.0100593f
pop ecx
pop ecx
push dword [ebp - 0x2c]
jmp 0x10052a9
cmp byte [ebp - 2], 1
jne 0x10052b7
push 0x1020
call fcn.0100593f
pop ecx
pop ecx
push dword [ebp - 0x30]
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call fcn.01005990
jmp 0x10052e3
push 0x101c
call fcn.0100593f
pop ecx
pop ecx
jmp 0x10052e3
push 0x101a
call fcn.0100593f
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01005990
mov dword [ebp - 8], 0xc0000001
cmp byte [ebp + 0xb], bl
jne 0x10052fa
cmp byte [ebp - 1], bl
jne 0x10052fa
push 0x9001c
push dword [ebp - 0xc]
call fcn.01004c15
push dword [ebp - 0x34]
call fcn.010057e4
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
push 0x101d
call fcn.0100593f
pop ecx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 8