Function at 0x47f803
Capabilities:
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov dword [ebp - 4], 0
cmp dword [0x674064], 0
je 0x47f8be
cmp dword [0x67405c], 0
je 0x47f8be
push 0x1c
push 0
push 0x674020
call fcn.004e9480
add esp, 0xc
push 0x1c
push 0
push 0x674040
call fcn.004e9480
add esp, 0xc
mov dword [0x674040], 0xd0
mov eax, dword [ebp + 0x2c]
shr eax, 9
mov dword [0x674044], eax
mov dword [0x674048], 0x53
mov dword [0x67404c], 0x4d
mov dword [0x674050], 0x49
mov dword [0x674054], 0xe0
mov dword [0x674058], 0xb0
push 0
mov ecx, dword [ebp + 0x2c]
push ecx
mov edx, dword [ebp + 0x28]
push edx
push 0x674020
push 0x674040
mov eax, dword [ebp + 0x20]
push eax
call fcn.0048134f
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47fd70
cmp dword [0x674064], 0
je 0x47f96a
cmp dword [0x674060], 0
je 0x47f96a
push 0x1c
push 0
push 0x674020
call fcn.004e9480
add esp, 0xc
push 0x1c
push 0
push 0x674040
call fcn.004e9480
add esp, 0xc
mov dword [0x674040], 0xd5
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
mov dword [0x674044], ecx
mov dword [0x674048], 0x53
mov dword [0x67404c], 0x4d
mov dword [0x674050], 0x49
mov dword [0x674054], 0xe0
mov dword [0x674058], 0xb0
push 0
mov edx, dword [ebp + 0x2c]
push edx
mov eax, dword [ebp + 0x28]
push eax
push 0x674020
push 0x674040
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0048134f
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47fd70
cmp dword [0x56d59c], 0
je 0x47f9fa
mov dword [0x674040], 0
mov edx, dword [ebp + 0x2c]
shr edx, 9
mov dword [0x674044], edx
mov eax, dword [ebp + 0x24]
and eax, 0xffff
mov dword [0x674048], eax
mov ecx, dword [ebp + 0x24]
shr ecx, 8
and ecx, 0xffff
mov dword [0x67404c], ecx
mov edx, dword [ebp + 0x24]
shr edx, 0x10
and edx, 0xffff
mov dword [0x674050], edx
mov dword [0x674054], 0xe0
mov dword [0x674058], 0xc8
push 2
mov eax, dword [ebp + 0x2c]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
push 0x674020
push 0x674040
mov edx, dword [ebp + 0x20]
push edx
call fcn.0048134f
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47fd70
cmp dword [ebp + 8], 0
je 0x47fb66
mov eax, dword [ebp + 0x2c]
shr eax, 9
mov word [ebp - 0x2c], ax
push 0x1f
push 0
lea ecx, [ebp - 0x28]
push ecx
call fcn.004e9480
add esp, 0xc
push 0xd
push 0
lea edx, [ebp - 0x3c]
push edx
call fcn.004e9480
add esp, 0xc
mov byte [ebp - 0x28], 0x55
mov byte [ebp - 0x27], 0x53
mov byte [ebp - 0x26], 0x42
mov byte [ebp - 0x25], 0x43
mov eax, dword [ebp + 0x2c]
and eax, 0xff
mov byte [ebp - 0x20], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 8
and ecx, 0xff
mov byte [ebp - 0x1f], cl
mov edx, dword [ebp + 0x2c]
shr edx, 0x10
and edx, 0xff
mov byte [ebp - 0x1e], dl
mov eax, dword [ebp + 0x2c]
shr eax, 0x18
and eax, 0xff
mov byte [ebp - 0x1d], al
mov byte [ebp - 0x1c], 0x80
mov byte [ebp - 0x1a], 0xa
mov cl, byte [ebp + 0x30]
mov byte [ebp - 0x19], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x18
mov byte [ebp - 0x17], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
mov byte [ebp - 0x16], al
mov ecx, dword [ebp + 0x24]
shr ecx, 8
mov byte [ebp - 0x15], cl
mov edx, dword [ebp + 0x24]
and edx, 0xff
mov byte [ebp - 0x14], dl
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
sar eax, 8
mov byte [ebp - 0x12], al
mov ecx, dword [ebp - 0x2c]
and ecx, 0xffff
and ecx, 0xff
mov byte [ebp - 0x11], cl
push 0
lea edx, [ebp - 8]
push edx
push 0x1f
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x47fafb
push str.Pipe_Stall
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47fd73
push 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0x2c]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x47fb23
xor eax, eax
jmp 0x47fd73
push 0
lea eax, [ebp - 8]
push eax
push 0xd
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x47fb49
xor eax, eax
jmp 0x47fd73
mov eax, dword [ebp - 0x30]
and eax, 0xff
test eax, eax
je 0x47fb5c
xor eax, eax
jmp 0x47fd73
mov eax, 1
jmp 0x47fd73
push 0x50
push 0
lea ecx, [ebp - 0x8c]
push ecx
call fcn.004e9480
add esp, 0xc
mov word [ebp - 0x8c], 0x2c
mov byte [ebp - 0x89], 0
mov byte [ebp - 0x88], 1
mov byte [ebp - 0x87], 0
mov byte [ebp - 0x86], 0x10
mov byte [ebp - 0x85], 0
mov byte [ebp - 0x84], 1
mov edx, dword [ebp + 0x2c]
mov dword [ebp - 0x80], edx
mov eax, dword [0x560eb0]
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], 0x30
mov dl, byte [ebp + 0x30]
mov byte [ebp - 0x70], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
and eax, 0xffff
shr eax, 8
mov byte [ebp - 0x6e], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
and ecx, 0xff
mov byte [ebp - 0x6d], cl
mov edx, dword [ebp + 0x24]
and edx, 0xffff
and edx, 0xffff
shr edx, 8
mov byte [ebp - 0x6c], dl
mov eax, dword [ebp + 0x24]
and eax, 0xffff
and eax, 0xffff
and eax, 0xff
mov byte [ebp - 0x6b], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
shr ecx, 8
mov byte [ebp - 0x69], cl
mov edx, dword [ebp + 0x2c]
shr edx, 9
and edx, 0xff
mov byte [ebp - 0x68], dl
mov dword [ebp - 0x94], 0x50
mov dword [ebp - 0x90], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x47fd70
push 0
lea eax, [ebp - 0x90]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
lea edx, [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x94]
push eax
lea ecx, [ebp - 0x8c]
push ecx
push 0x4d014
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
mov dword [ebp - 0x19c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x19c], eax
push 0x104
push 0
lea eax, [ebp - 0x198]
push eax
call fcn.004e9480
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x47fcf2
mov ecx, dword [ebp - 0x19c]
push ecx
mov edx, dword [ebp + 0x24]
push edx
push str._SMIReadSector_:_Read_LBA__0x_x__DeviceIoControl_ERROR___d_n
lea eax, [ebp - 0x198]
push eax
call fcn.004e998d
add esp, 0x10
lea ecx, [ebp - 0x198]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47fd73
mov edx, dword [ebp - 0x8a]
and edx, 0xff
test edx, edx
je 0x47fd37
mov eax, dword [ebp - 0x8a]
and eax, 0xff
push eax
mov ecx, dword [ebp + 0x24]
push ecx
push str._SMIReadSector_:_Read_LBA__0x_x__Fw_return_error___d_n
lea edx, [ebp - 0x198]
push edx
call fcn.004e998d
add esp, 0x10
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47fd73
cmp dword [ebp - 0x90], 3
jne 0x47fd69
mov ecx, dword [ebp + 0x24]
push ecx
push str._SMIReadSector_:_Read_LBA__0x_x__8Port_issue_fail_n
lea edx, [ebp - 0x198]
push edx
call fcn.004e998d
add esp, 0xc
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47fd73
mov eax, 1
jmp 0x47fd73
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret