Function at 0x47e2fa
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 [0x672bd4], 0
je 0x47e3b5
cmp dword [0x672bd0], 0
je 0x47e3b5
push 0x1c
push 0
push 0x672b90
call fcn.004e8440
add esp, 0xc
push 0x1c
push 0
push 0x672bb0
call fcn.004e8440
add esp, 0xc
mov dword [0x672bb0], 0xd6
mov eax, dword [ebp + 0x2c]
shr eax, 9
mov dword [0x672bb4], eax
mov dword [0x672bb8], 0x53
mov dword [0x672bbc], 0x4d
mov dword [0x672bc0], 0x49
mov dword [0x672bc4], 0xe0
mov dword [0x672bc8], 0xb0
push 0
mov ecx, dword [ebp + 0x2c]
push ecx
mov edx, dword [ebp + 0x28]
push edx
push 0x672b90
push 0x672bb0
mov eax, dword [ebp + 0x20]
push eax
call fcn.004805a3
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47e7bc
cmp dword [0x56c104], 0
je 0x47e467
push 0x1c
push 0
push 0x672b90
call fcn.004e8440
add esp, 0xc
push 0x1c
push 0
push 0x672bb0
call fcn.004e8440
add esp, 0xc
mov dword [0x672bb0], 0
mov ecx, dword [ebp + 0x2c]
shr ecx, 9
mov dword [0x672bb4], ecx
mov edx, dword [ebp + 0x24]
and edx, 0xffff
mov dword [0x672bb8], edx
mov eax, dword [ebp + 0x24]
shr eax, 8
and eax, 0xffff
mov dword [0x672bbc], eax
mov ecx, dword [ebp + 0x24]
shr ecx, 0x10
and ecx, 0xffff
mov dword [0x672bc0], ecx
mov dword [0x672bc4], 0xe0
mov dword [0x672bc8], 0xca
push 2
mov edx, dword [ebp + 0x2c]
push edx
mov eax, dword [ebp + 0x28]
push eax
push 0x672b90
push 0x672bb0
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004805a3
add esp, 0x18
mov dword [ebp - 4], eax
jmp 0x47e7bc
cmp dword [ebp + 8], 0
je 0x47e5c9
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.004e8440
add esp, 0xc
push 0xd
push 0
lea ecx, [ebp - 0x3c]
push ecx
call fcn.004e8440
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 0x47e55d
xor eax, eax
jmp 0x47e7bf
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 0x47e585
xor eax, eax
jmp 0x47e7bf
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 0x47e5ab
xor eax, eax
jmp 0x47e7bf
mov edx, dword [ebp - 0x30]
and edx, 0xff
test edx, edx
je 0x47e5bf
xor eax, eax
jmp 0x47e7bf
mov eax, 1
jmp 0x47e7bf
push 0x50
push 0
lea eax, [ebp - 0x8c]
push eax
call fcn.004e8440
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 [0x55fa20]
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 0x47e7bc
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.004e8440
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x47e762
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.004e894d
add esp, 0x14
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47e7bf
mov ecx, dword [ebp - 0x8a]
and ecx, 0xff
test ecx, ecx
je 0x47e7b5
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.004e894d
add esp, 0x14
lea edx, [ebp - 0x198]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x47e7bf
mov eax, 1
jmp 0x47e7bf
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret