Function at 0x4023f7
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [0x40880c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edi, eax
mov eax, dword [0x40880c]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x98], eax
mov eax, dword [0x408814]
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, eax
mov eax, dword [0x40880c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x74], eax
mov eax, dword [0x408814]
mov dword [ebp - 0x78], eax
mov al, byte [0x408810]
or al, byte [0x40d020]
or eax, 0x30
mov byte [ebp - 0x79], al
mov dword [esp + 4], 0x40910a
mov dword [esp], 0x40d040
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x402490
mov dword [esp + 4], 0xc
mov dword [esp], 0x21
call fcn.004015d3
jmp 0x402b9d
mov dword [esp + 8], 0
mov dword [esp + 4], 0x10000
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp + 4], 0x40910a
mov dword [esp], 0x40d160
call sub.msvcrt.dll_fopen
test eax, eax
je 0x4024e8
cmp byte [0x40d023], 0
jne 0x4024e8
mov dword [esp + 4], 0xc
mov dword [esp], 0x2a
call fcn.004015d3
jmp 0x402b9d
call fcn.00402190
test eax, eax
je 0x40250a
mov dword [esp + 4], 0xc
mov dword [esp], 0x28
call fcn.004015d3
jmp 0x402b9d
cmp byte [0x40d020], 0
jne 0x40251a
mov eax, 0x40910d
jmp 0x40251f
mov eax, 0x409110
mov dword [esp + 4], eax
mov dword [esp], 0x40d160
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x9c], eax
test eax, eax
jne 0x402552
mov dword [esp + 4], 0xc
mov dword [esp], 0x22
call fcn.004015d3
jmp 0x402b9d
cmp byte [0x40d021], 0
je 0x402579
fldz
fstp qword [esp + 8]
mov dword [esp + 4], str.readed......:__.0f_bytes_r
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [ebp - 0xc4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [ebp - 0x8c], eax
fldz
fst qword [ebp - 0xc0]
fst qword [ebp - 0xa8]
fstp qword [ebp - 0xb8]
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0x78]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], esi
lea edx, [ebp - 0x74]
mov dword [esp + 0x14], edx
mov ecx, dword [ebp - 0x98]
mov dword [esp + 0x10], ecx
lea eax, [ebp - 0x70]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
lea edx, [ebp - 0x6c]
mov dword [esp + 4], edx
lea ecx, [ebp - 0x79]
mov dword [esp], ecx
call fcn.00402c14
mov ebx, eax
mov al, byte [ebp - 0x79]
cmp al, 0x52
jne 0x40273d
mov eax, dword [ebp - 0xa0]
mov dword [esp + 0xc], eax
mov eax, dword [0x40880c]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fread
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0xa0]
test byte [edx + 0xc], 0x20
je 0x402692
cmp byte [0x40d021], 0
je 0x402665
mov byte [0x40d021], 0
mov ecx, dword [ebp - 0x8c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov edx, dword [ebp - 0xa0]
mov eax, dword [edx + 0xc]
and eax, 0x20
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffff4
mov dword [esp], 0x23
call fcn.004015d3
mov byte [ebp - 0x79], 0x42
jmp 0x4025b7
test eax, eax
jne 0x4026f9
cmp byte [0x40d021], 0
je 0x4026cc
mov byte [0x40d021], 0
mov ecx, dword [ebp - 0x8c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov edx, dword [ebp - 0xa0]
mov eax, dword [edx + 0xc]
and eax, 0x20
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffff4
mov dword [esp], 0x27
call fcn.004015d3
mov byte [ebp - 0x79], 0x42
jmp 0x4025b7
fld qword [ebp - 0xb8]
push eax
fiadd dword [esp]
lea esp, [esp + 4]
fst qword [ebp - 0xb8]
cmp byte [0x40d021], 0
je 0x402732
fstp qword [esp + 8]
mov dword [esp + 4], str.readed......:__.0f_bytes_r
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402734
fstp st(0)
mov byte [ebp - 0x79], 0x2b
jmp 0x4025b7
cmp al, 0x57
jne 0x402814
cmp byte [0x40d020], 0
jne 0x4027e8
mov edx, dword [ebp - 0x9c]
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x74]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov ecx, dword [ebp - 0x98]
mov dword [esp], ecx
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x9c]
test byte [eax + 0xc], 0x20
je 0x4027e8
cmp byte [0x40d021], 0
je 0x4027bb
mov byte [0x40d021], 0
mov edx, dword [ebp - 0x8c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov ecx, dword [ebp - 0x9c]
mov eax, dword [ecx + 0xc]
and eax, 0x20
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffff4
mov dword [esp], 0x26
call fcn.004015d3
mov byte [ebp - 0x79], 0x42
jmp 0x4025b7
mov eax, dword [ebp - 0x74]
test bl, 8
je 0x4027f7
mov byte [0x40d024], 1
fld qword [ebp - 0xa8]
push eax
fiadd dword [esp]
lea esp, [esp + 4]
fstp qword [ebp - 0xa8]
mov byte [ebp - 0x79], 0x2b
jmp 0x4025b7
cmp al, 0x4c
jne 0x402957
mov eax, dword [ebp - 0x78]
cmp ebx, 0xa
je 0x40282b
mov edx, eax
jmp 0x4028ab
mov edx, dword [ebp - 0x58]
cmp byte [0x40d022], 0
jne 0x402893
cmp byte [0x40d021], 0
je 0x40286d
mov byte [0x40d021], 0
mov eax, dword [ebp - 0x8c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov eax, dword [0x408814]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffff4
mov dword [esp], 0x25
call fcn.004015d3
mov byte [ebp - 0x79], 0x42
jmp 0x4025b7
mov ecx, eax
sub ecx, edx
mov edx, ecx
fld qword [ebp - 0xc0]
fadd dword [0x409124]
fstp qword [ebp - 0xc0]
cmp dword [ebp - 0xac], edx
jge 0x4028b9
mov dword [ebp - 0xac], edx
mov byte [esi + eax], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x409116
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [ebp - 0x9c]
test byte [edx + 0xc], 0x20
je 0x402946
cmp byte [0x40d021], 0
je 0x402919
mov byte [0x40d021], 0
mov ecx, dword [ebp - 0x8c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov edx, dword [ebp - 0x9c]
mov eax, dword [edx + 0xc]
and eax, 0x20
mov dword [esp + 8], eax
mov dword [esp + 4], 0xfffffff4
mov dword [esp], 0x26
call fcn.004015d3
mov byte [ebp - 0x79], 0x42
jmp 0x4025b7
mov eax, dword [0x408814]
mov dword [ebp - 0x78], eax
mov byte [ebp - 0x79], 0x2b
jmp 0x4025b7
cmp al, 0x53
jne 0x4025b7
test ebx, ebx
js 0x402968
cmp ebx, 2
jne 0x4029bb
cmp byte [0x40d021], 0
je 0x40299e
mov byte [0x40d021], 0
mov ecx, dword [ebp - 0x8c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x409112
call sub.msvcrt.dll_fwrite
mov dword [esp + 8], ebx
mov dword [esp + 4], 0xc
mov dword [esp], 0x24
call fcn.004015d3
jmp 0x402b9d
mov dword [esp], 0
call sub.msvcrt.dll_time
mov ebx, eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov edx, dword [ebp - 0x9c]
mov dword [esp], edx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.msvcrt.dll_free
mov ecx, dword [ebp - 0x98]
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_free
cmp byte [0x40d021], 0
je 0x402b98
fld qword [ebp - 0xb8]
fstp qword [esp + 8]
mov dword [esp + 4], str.readed......:__.0f_bytes_r
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [ebp - 0x8c]
mov dword [esp + 4], edx
mov dword [esp], 0xa
call sub.msvcrt.dll_fputc
fld qword [ebp - 0xa8]
fstp qword [esp + 8]
mov dword [esp + 4], str.written.....:__.0f_bytes_n
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
fldz
fld qword [ebp - 0xa8]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x45
jne 0x402aa3
fld qword [ebp - 0xb8]
fmul dword [0x409128]
fdivrp st(1)
fstp qword [esp + 8]
mov dword [esp + 4], str.compr.rate..:__.2f___n
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402aa5
fstp st(0)
fldz
fld qword [ebp - 0xc0]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x45
jne 0x402ade
mov eax, dword [ebp - 0xac]
mov dword [esp + 0x10], eax
fstp qword [esp + 8]
mov dword [esp + 4], str.overflows...:__.0f_line_s___max_size:__i_n
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x402ae0
fstp st(0)
sub ebx, dword [ebp - 0xc4]
mov edx, 0x3c
mov eax, ebx
mov ecx, edx
cdq
idiv ecx
mov dword [esp + 0x10], edx
mov ecx, 0x88888889
mov eax, ebx
imul ecx
lea eax, [ebx + edx]
mov edi, eax
sar edi, 5
mov edx, ebx
sar edx, 0x1f
mov dword [ebp - 0x9c], edx
sub edi, edx
mov eax, edi
imul ecx
lea ecx, [edi + edx]
sar ecx, 5
mov esi, edi
sar esi, 0x1f
sub ecx, esi
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
shl ecx, 2
mov eax, edi
sub eax, ecx
mov dword [esp + 0xc], eax
mov ecx, 0x91a2b3c5
mov eax, ebx
imul ecx
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], edx
add ebx, edx
sar ebx, 0xb
mov edx, ebx
sub edx, dword [ebp - 0x9c]
mov dword [esp + 8], edx
mov dword [esp + 4], str.elapsed_time:__i:_02i:_02i_n
mov edx, dword [ebp - 0x8c]
mov dword [esp], edx
call sub.msvcrt.dll_fprintf
cmp byte [0x40d024], 0
je 0x402b98
mov dword [esp + 4], str.WARNING:_at_least_one_data_loss_occurred_n
mov ecx, dword [ebp - 0x8c]
mov dword [esp], ecx
call sub.msvcrt.dll_fprintf
mov eax, 0
jmp 0x402b9d
mov eax, 0
add esp, 0xdc
pop ebx
pop esi
pop edi
leave
ret