Function at 0x40a130
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
xor eax, eax
push ebx
mov ecx, 0x41
sub esp, 0x380
lea edi, [esp + 0x88]
lea edx, [esp + 0x37]
mov dword [esp + 0x83], 0
mov dword [esp + 0x87], 0
mov dword [esp + 0x188], 0
lea ebx, [esp + 0x83]
rep stosd dword es:[edi], eax
lea edi, [esp + 0x38]
mov ecx, edx
mov dword [esp + 0x7f], 0
sub ecx, edi
add ecx, 0x4c
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [esp], edx
mov dword [esp + 0x37], 0x4c
mov dword [esp + 0x43], 0x420e18
mov dword [esp + 0x53], ebx
mov eax, dword [0x428e18]
mov dword [esp + 0x57], 0x104
mov dword [esp + 0x6b], 0x80004
mov dword [esp + 0x73], 0x420e54
mov dword [esp + 0x3b], eax
call sub.COMDLG32.DLL_GetSaveFileNameA
sub esp, 4
test eax, eax
jne 0x40a1e0
add esp, 0x380
pop ebx
pop esi
pop edi
ret
lea eax, [esp + 0x26]
mov dword [esp], eax
call sub.KERNEL32.dll_GetLocalTime
sub esp, 4
mov dword [esp + 4], 0x420e58
mov dword [esp], ebx
call sub.msvcrt.dll_fopen
test eax, eax
mov edi, eax
je 0x40a470
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x39
lea esi, [esp + 0x18c]
mov dword [esp + 4], 1
mov dword [esp], 0x420ce8
mov ebx, 0x421840
call sub.msvcrt.dll_fwrite
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x25
mov dword [esp + 4], 1
mov dword [esp], str.__BIKE2_Calibration_data_collection__n
call sub.msvcrt.dll_fwrite
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x420dd8
call sub.msvcrt.dll_fwrite
movzx eax, word [esp + 0x32]
mov dword [esp + 4], 0x420e9e
mov dword [esp], edi
mov dword [esp + 0x1c], eax
movzx eax, word [esp + 0x30]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x2e]
mov dword [esp + 0x14], eax
movzx eax, word [esp + 0x26]
mov dword [esp + 0x10], eax
movzx eax, word [esp + 0x28]
mov dword [esp + 0xc], eax
movzx eax, word [esp + 0x2c]
mov dword [esp + 8], eax
call sub.msvcrt.dll_fprintf
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x420dd8
call sub.msvcrt.dll_fwrite
mov eax, dword [0x428e18]
mov dword [esp + 0xc], 0xc8
mov dword [esp + 8], esi
mov dword [esp + 4], 0x12f
mov dword [esp], eax
call sub.USER32.dll_GetDlgItemTextA
sub esp, 0x10
mov dword [esp + 8], esi
mov dword [esp + 4], 0x420eba
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov eax, dword [0x428e18]
mov dword [esp + 0xc], 0xc8
mov dword [esp + 8], esi
mov dword [esp + 4], 0x130
mov dword [esp], eax
call sub.USER32.dll_GetDlgItemTextA
sub esp, 0x10
mov dword [esp + 8], esi
mov dword [esp + 4], 0x420ed4
mov dword [esp], edi
call sub.msvcrt.dll_fprintf
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x3a
mov dword [esp + 4], 1
mov dword [esp], 0x420ddc
call sub.msvcrt.dll_fwrite
mov eax, 0x12c
jmp 0x40a396
mov dword [esp + 0xc], esi
mov eax, dword [ebx]
add ebx, 8
mov dword [esp + 4], 0x420f0b
mov dword [esp], edi
mov dword [esp + 8], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebx + 4]
test eax, eax
je 0x40a3f3
mov dword [esp + 4], eax
mov eax, dword [0x428e18]
mov dword [esp + 0xc], 0xc8
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.USER32.dll_GetDlgItemTextA
sub esp, 0x10
test eax, eax
jne 0x40a372
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0x420e70
mov dword [esp + 4], 0x420ef9
mov dword [esp], 0
call sub.USER32.dll_MessageBoxA
sub esp, 0x10
mov dword [esp], edi
call sub.msvcrt.dll_fclose
add esp, 0x380
pop ebx
pop esi
pop edi
ret
mov eax, edi
call fcn.00409fb0
test al, al
jne 0x40a3e1
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x39
mov dword [esp + 4], 1
mov dword [esp], 0x420ce8
call sub.msvcrt.dll_fwrite
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x39
mov dword [esp + 4], 1
mov dword [esp], 0x420f18
call sub.msvcrt.dll_fwrite
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x38
mov dword [esp + 4], 1
mov dword [esp], 0x420f54
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call sub.msvcrt.dll_fclose
jmp 0x40a1d1
mov dword [esp + 8], ebx
lea ebx, [esp + 0x18c]
mov dword [esp + 4], 0x420e5a
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0x420e70
mov dword [esp + 4], ebx
mov dword [esp], 0
call sub.USER32.dll_MessageBoxA
sub esp, 0x10
jmp 0x40a1d1