Function at 0x40675d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
call fcn.00406714
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4067b8
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x16
mov dword [esp + 4], 1
mov dword [esp], str.Unable_to_create_mbdb_n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x4069be
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], 6
mov dword [esp + 4], 0x5fdeff
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x40680f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x21
mov dword [esp + 4], 1
mov dword [esp], str.Unable_to_identify_this_filetype_n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x4069be
mov dword [esp], 6
call sub.msvcrt.dll_malloc
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
test eax, eax
jne 0x40685f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x11
mov dword [esp + 4], 1
mov dword [esp], str.Allocation_error_n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x4069be
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 8], 6
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 8], 6
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
add dword [ebp - 0xc], 6
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
test eax, eax
jne 0x4068f2
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x13
mov dword [esp + 4], 1
mov dword [esp], str.Allocation_Error___n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x4069be
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov edx, eax
shr edx, 6
mov eax, edx
shl eax, 1
add eax, edx
shl eax, 3
sub eax, edx
shl eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xc], 0
jmp 0x4069b1
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0xc]
add eax, edx
mov dword [esp], eax
call fcn.00406ba2
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x406987
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Unable_to_parse_record_at_offset_0x_x__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x4069bb
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov ecx, eax
shl ecx, 2
add ecx, edx
mov edx, dword [ebp - 0x18]
mov dword [ecx], edx
lea edx, [eax + 1]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x58]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
ja 0x40694a
mov eax, dword [ebp - 0x10]
leave
ret