Function at 0x407c60
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x2ac
mov byte [esp + 0x4b], al
movzx eax, al
mov dword [esp + 0x7c], 0
mov dword [esp], eax
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
call fcn.00403ef0
test al, al
jne 0x407cc2
cmp bl, 2
je 0x407cd2
cmp bl, 3
je 0x408350
cmp bl, 1
je 0x408050
jmp 0x407cc2
fstp st(0)
mov eax, 1
add esp, 0x2ac
pop ebx
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
mov word [0x42a10a], cx
lea eax, [esp + 0x80]
mov dword [esp + 4], 0x41fbe4
mov dword [esp + 8], eax
mov eax, dword [0x42b3b0]
mov dword [esp], eax
call fcn.004055b0
test al, al
jne 0x408310
mov eax, dword [esp + 0x80]
mov dword [esp], str._STATUS_:_Maximum_Torque_for_calibration_is__u_Nm_n
mov dword [esp + 4], eax
call fcn.004036b0
mov eax, dword [0x428d78]
test eax, eax
je 0x408035
fldz
lea edi, [esp + 0xa0]
lea ebp, [esp + 0x8c]
mov esi, 0x42a120
mov dword [esp + 0x5c], 0x42a0c0
xor ebx, ebx
fst dword [esp + 0x40]
fst dword [esp + 0x44]
fld1
fchs
fstp dword [esp + 0x60]
fst dword [esp + 0x58]
fstp dword [esp + 0x30]
add ebx, 1
mov dword [esp + 8], str.CALPOS_d
mov dword [esp + 4], 0x20
mov dword [esp + 0xc], ebx
mov dword [esp], edi
call fcn.00414600
lea eax, [esp + 0x7c]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [0x42b3b0]
mov dword [esp], eax
call fcn.004055b0
test al, al
jne 0x4083a1
mov eax, dword [esp + 0x7c]
mov dword [esp + 4], ebx
mov dword [esp], str._STATUS_:_Calibrating:_CALPOS_d___Position__u_n
mov dword [esp + 8], eax
call fcn.004036b0
fld qword [0x420ca0]
mov eax, dword [esp + 0x7c]
mov dword [esp], str._INFO_:_Actual_torque:__f_n
fmul dword [esp + 0x30]
mov word [esi - 0x12], ax
fstp qword [esp + 0x30]
fld dword [esp + 0x84]
fstp qword [esp + 4]
call fcn.004036b0
fld qword [esp + 0x30]
mov eax, dword [esp + 0x80]
xor edx, edx
mov dword [esp + 0x34], edx
fstp dword [esp + 0x6c]
mov dword [esp + 0x30], eax
fld dword [esp + 0x6c]
fild qword [esp + 0x30]
fxch st(1)
fucompi st(1)
fstp st(0)
jbe 0x408060
fld qword [0x420ca0]
mov dword [esp], str._STATUS_:_Estimated_power_value__02f_W_n
fmul dword [esp + 0x40]
fstp dword [esp + 0x6c]
fld dword [esp + 0x6c]
fld qword [0x420ca0]
fmul dword [esp + 0x84]
fstp dword [esp + 0x84]
fst dword [esp + 0x40]
fstp qword [esp + 4]
call fcn.004036b0
fld dword [esp + 0x40]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.Pos:__u__Sp:__u__Estim_T:__f__Temp:__f__P:__f__Pc:__f_n
fstp qword [esp + 0x28]
mov dword [esp + 8], eax
mov eax, dword [0x428364]
add dword [0x428d74], 1
mov dword [esp], eax
fld dword [esp + 0x44]
fstp qword [esp + 0x20]
fld dword [esp + 0x58]
fstp qword [esp + 0x18]
fld dword [esp + 0x84]
fstp qword [esp + 0x10]
call sub.msvcrt.dll_fprintf
mov eax, dword [0x428d70]
cmp dword [0x428d74], eax
ja 0x4083bb
mov eax, dword [0x428364]
mov dword [esp + 8], 0x41
mov dword [esp + 4], 1
mov dword [esp], str.Theoretical_torque_is_bigger_than_maxTorque__setting_torque_to_0_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
fld dword [esp + 0x84]
fstp dword [esp + 0x30]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.CALPOS_d
mov dword [esp + 4], 0x14
mov dword [esp], ebp
call fcn.00414600
mov eax, dword [0x42b3b0]
mov dword [esp + 4], ebp
mov dword [esp], eax
call fcn.00405560
mov dword [esp + 0x54], eax
call fcn.00406020
mov dword [esp + 0x38], eax
call fcn.00403680
fild dword [esp + 0x38]
fsubrp st(1)
fstp dword [esp + 0x38]
call fcn.00411350
fsubr dword [esp + 0x38]
fstp dword [esp + 0x38]
call fcn.00411380
fsubr dword [esp + 0x30]
fld dword [esp + 0x38]
fmul st(1)
fxch st(1)
fstp dword [esp + 0x50]
fld dword [0x420ca8]
fmulp st(1)
fstp dword [esp + 0x44]
call fcn.004113b0
fsubr dword [esp + 0x44]
fstp dword [esp + 0x44]
call fcn.00406590
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
mov edx, dword [esp + 0x54]
mov eax, dword [0x428368]
mov dword [esp + 4], str._s___0.2f___0.2f___0.2f___3.2f_n
fstp qword [esp + 0x24]
mov dword [esp + 8], edx
mov dword [esp], eax
fld dword [esp + 0x44]
fstp qword [esp + 0x1c]
fld dword [esp + 0x50]
fstp qword [esp + 0x14]
fld dword [esp + 0x38]
fstp qword [esp + 0xc]
call sub.msvcrt.dll_fprintf
mov eax, dword [0x428368]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
fld dword [0x420c98]
movzx eax, byte [esp + 0x4b]
fld dword [esp + 0x40]
fucomi st(1)
fcmovnbe st(0), st(1)
fstp st(1)
cmp al, 2
fst dword [esp + 0x40]
je 0x4082d0
cmp al, 3
je 0x408290
cmp al, 1
jne 0x407cc0
fnstcw word [esp + 0x6a]
fld dword [0x420cb4]
movzx eax, word [esp + 0x6a]
mov ecx, dword [esp + 0x5c]
fmulp st(1)
mov ah, 0xc
mov word [esp + 0x68], ax
fldcw word [esp + 0x68]
fistp dword [esp + 0x64]
fldcw word [esp + 0x6a]
mov eax, dword [esp + 0x64]
mov word [esi], ax
mov word [ecx], ax
mov eax, dword [0x428364]
add esi, 2
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add dword [esp + 0x5c], 2
cmp dword [0x428d78], ebx
ja 0x407d5e
mov dword [esp], 0
call fcn.00404150
test al, al
setne al
jmp 0x407cc7
xor ebx, ebx
mov word [0x42a108], bx
jmp 0x407cdb
mov eax, dword [0x428364]
mov dword [esp + 8], 0x1a
mov dword [esp + 4], 1
mov dword [esp], str.Getting_power_measurement_n
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call fcn.00404150
test al, al
jne 0x407cc2
call fcn.00406180
mov dword [esp], 0x7d0
call sub.KERNEL32.dll_Sleep
sub esp, 4
call fcn.00406590
mov dword [esp + 0x40], eax
lea eax, [esp + 0x88]
mov dword [esp + 4], 0x41fda5
fild dword [esp + 0x40]
mov dword [esp + 0x88], 1
mov dword [esp + 8], eax
mov eax, dword [0x42b3b0]
fstp dword [esp + 0x58]
mov dword [esp + 0x84], 0
mov dword [esp], eax
call fcn.004055b0
test al, al
jne 0x408272
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
mov dword [esp], str._STATUS_:_Getting__u_measures..._n
call fcn.004036b0
mov dword [esp], ebp
call fcn.00403d40
test al, al
jne 0x408330
call fcn.00403680
fstp dword [esp + 0x40]
call fcn.00411350
fsubr dword [esp + 0x40]
lea eax, [esp + 0x84]
mov dword [esp], eax
fsubr dword [esp + 0x8c]
fstp dword [esp + 0x8c]
call fcn.004038e0
test al, al
jne 0x408360
call fcn.004036a0
fstp dword [esp + 0x40]
call fcn.00411380
fadd dword [esp + 0x40]
fsubr dword [esp + 0x84]
fst dword [esp + 0x84]
fmul dword [esp + 0x8c]
fmul dword [0x420ca8]
fstp dword [esp + 0x40]
call fcn.004113b0
fsubr dword [esp + 0x40]
fstp dword [esp + 0x30]
call fcn.00406590
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fsubr dword [0x420cac]
fmul dword [0x420cb0]
fld dword [esp + 0x30]
fsubr st(1), st(0)
fld st(1)
fstp dword [esp + 0x40]
fldz
fucomi st(2)
ja 0x408390
fstp st(0)
fld dword [esp + 0x84]
fldz
fucomi st(1)
ja 0x408380
fstp st(0)
fldz
fucomi st(2)
ja 0x408370
fstp st(0)
fxch st(1)
fst qword [esp + 0x14]
mov dword [esp], str._STATUS_:_Values_CompPwr:__.2f_Torque:__.2f_RawPwr:__.2f_n
fstp qword [esp + 0x38]
fstp qword [esp + 0xc]
fst qword [esp + 4]
fstp qword [esp + 0x30]
call fcn.004036b0
fld qword [esp + 0x38]
fld qword [esp + 0x30]
fstp qword [esp + 0x28]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.Pos:__u__Sp:__u__T:__f__Temp:__f__P:__f__Pc:__f_n
fstp qword [esp + 0x20]
mov dword [esp + 8], eax
mov eax, dword [0x428364]
fld dword [esp + 0x58]
fstp qword [esp + 0x18]
mov dword [esp], eax
fld dword [esp + 0x84]
fstp qword [esp + 0x10]
call sub.msvcrt.dll_fprintf
fld dword [esp + 0x84]
fld dword [esp + 0x60]
fucompi st(1)
jae 0x4083d1
fst dword [esp + 0x60]
fstp dword [esp + 0x30]
jmp 0x407eda
mov dword [esp + 0x88], 0xa
mov eax, 0xa
jmp 0x408103
fstp st(0)
fld dword [esp + 0x40]
fnstcw word [esp + 0x6a]
movzx eax, word [esp + 0x6a]
mov ecx, dword [esp + 0x5c]
fmul dword [0x420cb4]
mov ah, 0xc
mov word [esp + 0x68], ax
fldcw word [esp + 0x68]
fistp dword [esp + 0x64]
fldcw word [esp + 0x6a]
mov eax, dword [esp + 0x64]
mov word [esi + 0x24], ax
mov word [ecx + 0x24], ax
jmp 0x408014
fstp st(0)
fld dword [esp + 0x40]
fnstcw word [esp + 0x6a]
movzx eax, word [esp + 0x6a]
mov ecx, dword [esp + 0x5c]
fmul dword [0x420cb4]
mov ah, 0xc
mov word [esp + 0x68], ax
fldcw word [esp + 0x68]
fistp dword [esp + 0x64]
fldcw word [esp + 0x6a]
mov eax, dword [esp + 0x64]
mov word [esi + 0x12], ax
mov word [ecx + 0x12], ax
jmp 0x408014
mov dword [esp], str._ERROR_:_MAXTORQUE_not_available_in_cal._n
call fcn.004036b0
add esp, 0x2ac
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str._ERROR_:_Error_in_reading_the_speed_data._n
call fcn.004036b0
fldz
fld st(0)
fld st(1)
fstp dword [esp + 0x40]
fxch st(1)
jmp 0x408212
xor edx, edx
mov word [0x42a10c], dx
jmp 0x407cdb
mov dword [esp], 0x41fe00
jmp 0x408337
fstp st(2)
fxch st(1)
jmp 0x4081ea
fstp st(1)
fst dword [esp + 0x84]
jmp 0x4081dc
fstp st(2)
fxch st(1)
fld st(0)
fstp dword [esp + 0x40]
fxch st(1)
jmp 0x4081c9
mov dword [esp + 4], edi
mov dword [esp], str._ERROR_:__s_not_available._n
call fcn.004036b0
mov eax, 1
jmp 0x407cc7
mov dword [esp], str._ERROR_:_TOO_MANY_ESTIMATED_MEASURES_n
call fcn.004036b0
mov eax, 1
jmp 0x407cc7
fstp st(0)
mov dword [esp], str._ERROR_:_Torque_is_lower_than_the_previous_one_n
call fcn.004036b0
mov eax, 1
jmp 0x407cc7