Function at 0x401705
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x54
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s.txt
lea eax, [ebp - 0x36]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0x40622c
lea eax, [ebp - 0x36]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40175a
lea eax, [ebp - 0x36]
mov dword [esp + 4], eax
mov dword [esp], str.__ERROR___Cannot_open_file__s_n
call sym._printf
jmp 0x40192d
mov dword [ebp - 0xc], 0
jmp 0x401803
mov eax, dword [ebp + 0xc]
sub eax, 1
cmp eax, dword [ebp - 0xc]
je 0x4017b9
mov eax, dword [ebp - 0xc]
imul edx, eax, 0x2c
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0x28]
mov edx, dword [ebp - 0xc]
imul ecx, edx, 0x2c
mov edx, dword [ebp + 8]
add edx, ecx
add edx, 0x14
mov ecx, dword [ebp - 0xc]
imul ebx, ecx, 0x2c
mov ecx, dword [ebp + 8]
add ecx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._s__s__d_n
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fprintf
jmp 0x4017ff
mov eax, dword [ebp - 0xc]
imul edx, eax, 0x2c
mov eax, dword [ebp + 8]
add eax, edx
mov eax, dword [eax + 0x28]
mov edx, dword [ebp - 0xc]
imul ecx, edx, 0x2c
mov edx, dword [ebp + 8]
add edx, ecx
add edx, 0x14
mov ecx, dword [ebp - 0xc]
imul ebx, ecx, 0x2c
mov ecx, dword [ebp + 8]
add ecx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str._s__s__d
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fprintf
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
jl 0x401766
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
mov dword [esp], str.__EXIT___Data_is_saved_in_text_format_
call sym._puts
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s.bin
lea eax, [ebp - 0x36]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 0x406292
lea eax, [ebp - 0x36]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x401874
lea eax, [ebp - 0x36]
mov dword [esp + 4], eax
mov dword [esp], str.__ERROR___Cannot_open_file__s_n
call sym._printf
jmp 0x40192d
mov dword [ebp - 0x10], 0
jmp 0x40190a
mov eax, dword [ebp - 0x10]
imul edx, eax, 0x2c
mov eax, dword [ebp + 8]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x14
mov dword [esp + 4], 1
mov dword [esp], edx
call sym._fwrite
mov eax, dword [ebp - 0x10]
imul edx, eax, 0x2c
mov eax, dword [ebp + 8]
add eax, edx
lea edx, [eax + 0x14]
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x14
mov dword [esp + 4], 1
mov dword [esp], edx
call sym._fwrite
mov eax, dword [ebp - 0x10]
imul edx, eax, 0x2c
mov eax, dword [ebp + 8]
add eax, edx
lea edx, [eax + 0x28]
mov eax, dword [ebp - 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], edx
call sym._fwrite
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jl 0x401880
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._fclose
mov dword [esp], str.__EXIT___Data_is_saved_in_binary_format_
call sym._puts
add esp, 0x54
pop ebx
pop ebp
ret