Function at 0x407150
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4cc
lea edi, [esp + 0x9c]
mov ebx, dword [esp + 0x4e0]
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_time]
mov eax, dword [esp + 0x9c]
mov ebp, dword [ebx + 0x914]
mov esi, dword [ebx + 0x96c]
mov dword [esp], edi
lea edi, [esp + 0xa0]
cdq
add eax, 0x7c25b080
adc edx, 0
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], edx
call dword [sym.imp.msvcrt.dll_localtime]
mov edx, dword [eax]
mov dword [esp + 0x1c], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x18], edx
mov edx, dword [eax + 8]
mov dword [esp + 0x14], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 0x10]
add edx, 1
mov dword [esp + 0xc], edx
mov eax, dword [eax + 0x14]
mov dword [esp], edi
add eax, 0x76c
mov dword [esp + 4], 0x4bf3b3
mov dword [esp + 8], eax
call sym.sprintf_char__char_const__..._
mov dword [esp + 8], ebp
lea ebp, [esp + 0x1c0]
mov dword [esp + 4], 0x4bf3cb
mov dword [esp], ebp
call sym.sprintf_char__char_const__..._
mov dword [esp + 0x18], edi
mov eax, dword [ebx + 0x18c]
lea edi, [esp + 0x2c0]
mov dword [esp + 0x10], 0x4bf3ce
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x5c
mov dword [esp + 8], ebp
mov dword [esp + 4], 0x4bf3d6
mov dword [esp], edi
call sym.sprintf_char__char_const__..._
mov dword [esp], ebp
call dbg.opendir
test eax, eax
je 0x407628
mov eax, dword [ebx + 0x1cc]
mov eax, dword [eax]
test eax, 0x200000
jne 0x407590
mov dword [esp + 4], 0x4bf45b
mov dword [esp], edi
call sym._fopen
mov dword [esp + 0x8c], eax
test eax, eax
je 0x407640
mov eax, dword [ebx + 0x18c]
mov dword [esp + 0x88], eax
mov eax, dword [ebx + 0x1cc]
mov eax, dword [eax]
test eax, 0x200000
jne 0x4075c0
lea ebp, [esp + 0xc0]
xor eax, eax
mov ecx, 0x40
mov edx, dword [ebx + 0x92c]
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x928]
mov dword [esp + 0x74], edx
mov edx, dword [ebx + 0x924]
mov dword [esp + 0x70], eax
mov eax, dword [ebx + 0x920]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x78], eax
mov eax, dword [ebx + 0x248]
mov eax, dword [eax + 8]
test eax, eax
jle 0x407580
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], str.CI_SN:_d_nFP_SN:_d_nlaser_enable_timestamp:_llu_nlaser_ready_timestamp:_llu_nlaser_timeout_timestamp:_llu_n
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 8], eax
mov dword [esp], ebp
call sym.sprintf_char__char_const__..._
mov dword [esp], ebp
call sym._strlen
mov edi, dword [esp + 0x8c]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp + 0xc], edi
mov dword [esp], ebp
call sym._fwrite
mov dword [esp + 4], str.MAGA_tMAGB_tVLAS_tILAS_tVPELT_tIPELT_tVLASSWP_tT_HOT_tT_COLD_tprobe_temp_tprobe_v2_tuptime_tusbFifoWpos_n
mov dword [esp], ebp
call sym.sprintf_char__char_const__..._
mov dword [esp], ebp
call sym._strlen
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebp
call sym._fwrite
cmp dword [ebx + 0x970], 1
mov dword [esp + 0x88], 0
jne 0x4074f4
jmp 0x407548
call sym._lis3dhReg2Volt
mov ecx, dword [ebx + 0x95c]
xor edx, edx
fstp qword [esp + 0x80]
mov dword [esp + 0x7c], edx
mov eax, dword [ecx + edi]
mov dword [esp + 0x78], eax
fild qword [esp + 0x78]
fstp qword [esp]
call sym._lis3dhReg2Temp
mov eax, dword [esp + 0x68]
fld qword [esp + 0x80]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x70]
fstp qword [esp + 0x50]
mov dword [esp + 0x58], eax
fstp qword [esp + 0x48]
mov ecx, dword [ebx + 0x958]
fild dword [ecx + edi]
fmul qword [0x4c0f80]
fadd qword [str.fffff]
fstp qword [esp + 0x40]
mov ecx, dword [ebx + 0x954]
fild dword [ecx + edi]
fmul qword [0x4c0f80]
fadd qword [str.fffff]
fstp qword [esp + 0x38]
mov ecx, dword [ebx + 0x950]
fild word [ecx + edi]
fld dword [0x4c0f90]
fdiv st(1), st(0)
fxch st(1)
fstp qword [esp + 0x30]
mov ecx, dword [ebx + 0x94c]
fild word [ecx + edi]
fld dword [0x4c0f94]
fmul st(1), st(0)
fxch st(1)
fstp qword [esp + 0x28]
mov ecx, dword [ebx + 0x948]
fild word [ecx + edi]
fdiv st(2)
fstp qword [esp + 0x20]
mov ecx, dword [ebx + 0x944]
fild word [ecx + edi]
fmulp st(1)
fstp qword [esp + 0x18]
mov ecx, dword [ebx + 0x940]
fild word [ecx + edi]
fdivrp st(1)
fstp qword [esp + 0x10]
mov ecx, dword [ebx + 0x93c]
mov ecx, dword [ecx + edi]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebx + 0x938]
mov eax, dword [ecx + edi]
mov dword [esp + 4], str._d_t_d_t_.2f_t_.2f_t_.2f_t_.2f_t_.2f_t_.1f_t_.1f_t_.1f_t_.3f_t_d_t_u_n
mov dword [esp], ebp
mov dword [esp + 8], eax
call sym.sprintf_char__char_const__..._
mov dword [esp], ebp
call sym._strlen
mov edi, dword [esp + 0x8c]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp + 0xc], edi
mov dword [esp], ebp
call sym._fwrite
mov eax, dword [ebx + 0x970]
add dword [esp + 0x88], 1
mov edx, dword [esp + 0x88]
sub eax, 1
cmp eax, edx
jbe 0x407548
lea edx, [esi + 1]
mov esi, dword [ebx + 0x974]
mov ecx, dword [ebx + 0x968]
and esi, edx
cmp dword [ebx + 0x194], 2
mov eax, dword [ecx + esi*4]
mov ecx, dword [ebx + 0x964]
lea edi, [esi*4]
mov dword [esp + 0x68], eax
mov eax, dword [ecx + esi*4]
mov ecx, dword [ebx + 0x960]
mov dword [esp + 0x70], eax
mov ecx, dword [ecx + esi*4]
mov dword [esp], ecx
jle 0x4073b0
call sym._lis3dhReg2Volt2v0
jmp 0x4073b5
mov esi, dword [esp + 0x8c]
mov dword [esp], esi
call sym._fflush
mov dword [esp], esi
call sym._fclose
mov eax, dword [ebx + 0x1cc]
mov eax, dword [eax]
test ah, 0x10
jne 0x4075f8
add esp, 0x4cc
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x190]
jmp 0x4072e7
mov dword [esp + 0xc], edi
mov eax, dword [ebx + 0x190]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x18c]
mov dword [esp], str.DEBUG:_d_d:_create_timeout_log_file_:_opening_timeout_log_file__s._n
mov dword [esp + 4], eax
call sym._pprintf
jmp 0x40725d
mov eax, dword [ebx + 0x190]
mov dword [esp], str.DEBUG:_d_d:_opening_of_timeout_file_successful._n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 4], eax
call sym._pprintf
mov eax, dword [ebx + 0x18c]
mov dword [esp + 0x88], eax
jmp 0x40729c
mov eax, dword [ebx + 0x190]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x18c]
mov dword [esp], str.DEBUG:_d_d:_closing_of_timeout_file._n
mov dword [esp + 4], eax
call sym._pprintf
add esp, 0x4cc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebp
mov dword [esp], str.ERROR:Cannot_open_save_path_directory__s_n
call sym._pprintf
jmp 0x407570
mov dword [esp + 0xc], edi
mov eax, dword [ebx + 0x190]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x18c]
mov dword [esp], str.ERROR:_d_d:_failed_to_open_timeout_file__s._n
mov dword [esp + 4], eax
call sym._pprintf
jmp 0x407570