Function at 0x47f33a
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 0x47f3f5
cmp dword [0x674060], 0
je 0x47f3f5
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], 0xd6
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.004815e3
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47f7fc
cmp dword [0x56d59c], 0
je 0x47f4a7
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], 0
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
mov dword [0x674044], ecx
mov edx, dword [ebp + 0x24]
and edx, 0xffff
mov dword [0x674048], edx
mov eax, dword [ebp + 0x24]
shr eax, 8
and eax, 0xffff
mov dword [0x67404c], eax
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
mov dword [0x674050], ecx
mov dword [0x674054], 0xe0
mov dword [0x674058], 0xca
push 2
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.004815e3
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47f7fc
cmp dword [ebp + 8], 0
je 0x47f609
mov edx, dword [ebp + 0x2c]
shr edx, 9
mov word [ebp - 0x2c], dx
push 0x1f
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.004e9480
add esp, 0xc
push 0xd
push 0
lea ecx, [ebp - 0x3c]
push ecx
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 edx, dword [ebp + 0x2c]
and edx, 0xff
mov byte [ebp - 0x20], dl
mov eax, dword [ebp + 0x2c]
shr eax, 8
and eax, 0xff
mov byte [ebp - 0x1f], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 0x10
and ecx, 0xff
mov byte [ebp - 0x1e], cl
mov edx, dword [ebp + 0x2c]
shr edx, 0x18
and edx, 0xff
mov byte [ebp - 0x1d], dl
mov byte [ebp - 0x1b], 0
mov byte [ebp - 0x1a], 0xa
mov al, byte [ebp + 0x30]
mov byte [ebp - 0x19], al
mov ecx, dword [ebp + 0x24]
shr ecx, 0x18
mov byte [ebp - 0x17], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x10
mov byte [ebp - 0x16], dl
mov eax, dword [ebp + 0x24]
shr eax, 8
mov byte [ebp - 0x15], al
mov ecx, dword [ebp + 0x24]
and ecx, 0xff
mov byte [ebp - 0x14], cl
mov edx, dword [ebp - 0x2c]
and edx, 0xffff
sar edx, 8
mov byte [ebp - 0x12], dl
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
and eax, 0xff
mov byte [ebp - 0x11], al
push 0
lea ecx, [ebp - 8]
push ecx
push 0x1f
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x47f59d
xor eax, eax
jmp 0x47f7ff
push 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp + 0x2c]
push edx
mov eax, dword [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 0x47f5c5
xor eax, eax
jmp 0x47f7ff
push 0
lea edx, [ebp - 8]
push edx
push 0xd
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x47f5eb
xor eax, eax
jmp 0x47f7ff
mov edx, dword [ebp - 0x30]
and edx, 0xff
test edx, edx
je 0x47f5ff
xor eax, eax
jmp 0x47f7ff
mov eax, 1
jmp 0x47f7ff
push 0x50
push 0
lea eax, [ebp - 0x8c]
push eax
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], 0
mov ecx, dword [ebp + 0x2c]
mov dword [ebp - 0x80], ecx
mov edx, dword [0x560eb0]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], 0x30
mov cl, byte [ebp + 0x30]
mov byte [ebp - 0x70], cl
mov edx, dword [ebp + 0x24]
shr edx, 0x10
and edx, 0xffff
shr edx, 8
mov byte [ebp - 0x6e], dl
mov eax, dword [ebp + 0x24]
shr eax, 0x10
and eax, 0xffff
and eax, 0xff
mov byte [ebp - 0x6d], al
mov ecx, dword [ebp + 0x24]
and ecx, 0xffff
and ecx, 0xffff
shr ecx, 8
mov byte [ebp - 0x6c], cl
mov edx, dword [ebp + 0x24]
and edx, 0xffff
and edx, 0xffff
and edx, 0xff
mov byte [ebp - 0x6b], dl
mov eax, dword [ebp + 0x2c]
shr eax, 9
shr eax, 8
mov byte [ebp - 0x69], al
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
and ecx, 0xff
mov byte [ebp - 0x68], cl
mov dword [ebp - 0x94], 0x50
mov dword [ebp - 0x90], 0
cmp dword [ebp + 0x20], 0xffffffff
je 0x47f7fc
push 0
lea edx, [ebp - 0x90]
push edx
mov eax, dword [ebp - 0x94]
push eax
lea ecx, [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x94]
push edx
lea eax, [ebp - 0x8c]
push eax
push 0x4d014
mov ecx, dword [ebp + 0x20]
push ecx
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 edx, [ebp - 0x198]
push edx
call fcn.004e9480
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x47f7a2
mov eax, dword [ebp - 0x19c]
push eax
mov ecx, dword [ebp + 0x28]
xor edx, edx
mov dl, byte [ecx + 1]
push edx
mov eax, dword [ebp + 0x28]
xor ecx, ecx
mov cl, byte [eax]
push ecx
push str._SMIWritesector_:_Data_0___0x_x__Data_1___0x_x__DeviceIoControl_ERROR___d_n
lea edx, [ebp - 0x198]
push edx
call fcn.004e998d
add esp, 0x14
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47f7ff
mov ecx, dword [ebp - 0x8a]
and ecx, 0xff
test ecx, ecx
je 0x47f7f5
mov edx, dword [ebp - 0x8a]
and edx, 0xff
push edx
mov eax, dword [ebp + 0x28]
xor ecx, ecx
mov cl, byte [eax + 1]
push ecx
mov edx, dword [ebp + 0x28]
xor eax, eax
mov al, byte [edx]
push eax
push str._SMIWritesector_:_Data_0___0x_x__Data_1___0x_x__Fw_return_error___d_n
lea ecx, [ebp - 0x198]
push ecx
call fcn.004e998d
add esp, 0x14
lea edx, [ebp - 0x198]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47f7ff
mov eax, 1
jmp 0x47f7ff
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret