Function at 0x415db0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x834
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jb 0x415e99
push 0x44cc1c
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x415ea4
mov eax, dword [str.Can_not_open_file:]
mov ecx, dword [0x44ccdc]
mov edx, dword [0x44cce0]
mov dword [esp + 0x440], eax
mov eax, dword [0x44cce4]
mov dword [esp + 0x444], ecx
mov cx, word [0x44cce8]
mov dword [esp + 0x448], edx
mov dl, byte [0x44ccea]
mov dword [esp + 0x44c], eax
mov word [esp + 0x450], cx
mov ecx, 0x7b
xor eax, eax
lea edi, [esp + 0x453]
mov byte [esp + 0x452], dl
lea edx, [esp + 0x440]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x10]
mov ecx, ebx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x415e99
push 0
lea eax, [esp + 0x444]
push 0
push eax
call sub.MFC42.DLL_AfxMessageBox
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x640]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x640]
push ecx
call dword [sym.imp.MSVCRT.dll__strlwr]
mov eax, dword [ebp + 0xc]
add esp, 4
cmp eax, 4
je 0x41628d
lea edx, [esp + 0x640]
push 0x2e
push edx
mov edi, str..tif
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov esi, eax
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x415f2b
test al, al
je 0x415f25
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x415f2b
add esi, 2
add edi, 2
test al, al
jne 0x415f01
xor esi, esi
xor eax, eax
jmp 0x415f32
sbb eax, eax
sbb eax, 0xffffffff
xor esi, esi
cmp eax, esi
je 0x41628f
cmp dword [ebp + 0xc], 3
jne 0x416122
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
push ecx
mov ecx, dword [ebx + 0x28]
push edx
mov edx, dword [ebx + 0x24]
push eax
mov eax, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebx + 0x1c]
push edx
mov edx, dword [ebx + 0x18]
lea edi, [ebx + 8]
push eax
mov eax, dword [ebx + 0x14]
push ecx
mov ecx, dword [ebx + 0x10]
push edx
mov edx, dword [edi + 4]
push eax
mov eax, dword [edi]
push ecx
push edx
push eax
lea ecx, [esp + 0x474]
push str.DEMBIN_VER:1.0_Supresoft_Inc._Format:_Tag_512Bytes__minX_double__minY_double__Kap_double__Dx_double__Dy_double__Cols_int__Rows_int__Z_float_...__.3lf__.3lf__.3lf__.3f__.3f__d__d
push ecx
mov dword [esp + 0x5c], edi
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [ebp + 8]
push 0xc0000000
push edx
call fcn.00415ce0
mov esi, eax
add esp, 0x44
test esi, esi
je 0x415e99
cmp esi, 0xffffffff
je 0x415e99
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x448]
push 0x200
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x10]
push 0
push edx
push 0x30
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x38]
mov edi, dword [ebx + 0x30]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x34]
shl edi, 2
test eax, eax
mov dword [esp + 0x18], 0
jle 0x416032
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push 0
push ecx
push edi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov ecx, dword [ebx + 0x34]
inc eax
add edx, edi
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], edx
jl 0x416004
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 0x34]
imul eax, dword [ebx + 0x30]
shl eax, 2
cmp eax, 0x4000000
jbe 0x416282
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x440]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x44cc1c
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x444]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..hdr
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x444]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x416282
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
push ecx
mov ecx, dword [ebx + 0x28]
push edx
mov edx, dword [ebx + 0x24]
push eax
mov eax, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebx + 0x1c]
push edx
mov edx, dword [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x14]
push ecx
mov ecx, dword [ebx + 0x10]
push edx
push eax
mov eax, dword [esp + 0x44]
push ecx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push edx
push eax
push str._.12lf__.12lf__.12lf__.12lf__.12lf__d__d
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x3c
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
push ecx
mov ecx, dword [ebx + 0x28]
push edx
mov edx, dword [ebx + 0x24]
push eax
mov eax, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebx + 0x1c]
mov esi, dword [esp + 0x20]
push edx
mov edx, dword [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x14]
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push ecx
mov ecx, dword [ebx + 0x10]
push edx
mov edx, dword [ebx + 0xc]
push eax
mov eax, dword [ebx + 8]
push ecx
push edx
push eax
push str._.12lf__.12lf__.12lf__.12lf__.12lf__d__d_n
push esi
call edi
mov eax, dword [ebx + 0x34]
mov edx, dword [ebx]
add esp, 0x38
mov ecx, ebx
push eax
call dword [edx + 0x24]
mov ecx, dword [ebx + 0x34]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0xc], eax
jle 0x416271
jmp 0x416187
xor eax, eax
mov ecx, dword [ebx + 0x30]
mov dword [esp + 0x18], eax
cmp ecx, eax
mov dword [esp + 0x10], eax
jle 0x416245
cmp dword [esp + 0x18], 0xa
jne 0x4161b4
push 0x44cd50
push esi
call edi
add esp, 8
mov dword [esp + 0x18], 0
mov ecx, dword [ebx + 0x30]
mov edx, dword [esp + 0x10]
imul ecx, dword [esp + 0xc]
add ecx, edx
mov edx, dword [ebx + 0x38]
lea eax, [edx + ecx*4]
mov ecx, dword [edx + ecx*4]
cmp ecx, 0xc7c34f80
jne 0x4161f3
cmp dword [ebp + 0xc], 2
jne 0x4161e6
push str._9999.9
push esi
call edi
add esp, 8
jmp 0x416221
push str._99999
push esi
call edi
add esp, 8
jmp 0x416221
cmp dword [ebp + 0xc], 2
jne 0x416208
fld dword [eax]
sub esp, 8
fstp qword [esp]
push str._.3f
jmp 0x41621b
fld dword [eax]
fmul dword [0x4425f4]
sub esp, 8
fstp qword [esp]
push str._.0f
push esi
call edi
add esp, 0x10
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x30]
inc eax
inc edx
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
jl 0x41619a
mov eax, edx
cmp eax, 0xa
jg 0x416250
push 0x44cd50
push esi
call edi
add esp, 8
mov edx, dword [esp + 0xc]
mov eax, dword [ebx]
inc edx
push 1
mov ecx, ebx
mov dword [esp + 0x10], edx
call dword [eax + 0x28]
mov ecx, dword [esp + 0xc]
mov eax, dword [ebx + 0x34]
cmp ecx, eax
jl 0x416185
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x2c]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor esi, esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x44]
mov edx, 4
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x30]
mov eax, 1
mov dword [esp + 0x52], eax
mov dword [esp + 0x56], eax
mov dword [esp + 0x5e], eax
mov dword [esp + 0x62], eax
mov word [esp + 0x68], dx
mov dword [esp + 0x6a], eax
mov word [esp + 0x74], dx
mov edx, dword [ebx + 0x34]
mov dword [esp + 0x76], eax
mov dword [esp + 0x82], eax
mov dword [esp + 0x8e], eax
mov dword [esp + 0x92], eax
mov dword [esp + 0x9a], eax
mov dword [esp + 0xa6], eax
mov dword [esp + 0xaa], eax
mov dword [esp + 0xb2], eax
mov dword [esp + 0xb6], eax
mov dword [esp + 0xbe], eax
mov dword [esp + 0xca], eax
mov dword [esp + 0xd6], eax
mov eax, ecx
mov edi, 3
imul eax, edx
shl eax, 2
mov dword [esp + 0xda], eax
mov eax, dword [ebx + 0x1c]
push eax
mov eax, dword [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x24]
mov word [esp + 0x58], di
mov word [esp + 0x64], di
mov word [esp + 0x88], di
mov word [esp + 0x94], di
mov word [esp + 0xa0], di
mov dword [esp + 0xa6], edi
mov word [esp + 0xac], di
mov word [esp + 0xb8], di
push eax
mov eax, dword [ebx + 0x20]
mov edi, 4
mov dword [esp + 0x1c], esi
mov word [esp + 0x50], 0x4949
mov word [esp + 0x52], 0x2a
mov dword [esp + 0x54], 8
mov word [esp + 0x58], 0xd
mov word [esp + 0x5a], 0xfe
mov word [esp + 0x66], 0x103
mov word [esp + 0x72], 0x100
mov dword [esp + 0x7a], ecx
mov word [esp + 0x7e], 0x101
mov dword [esp + 0x86], edx
mov word [esp + 0x8a], 0x102
mov dword [esp + 0x92], 0x20
mov word [esp + 0x96], 0x115
mov word [esp + 0xa2], 0x153
mov word [esp + 0xae], 0x106
mov word [esp + 0xba], 0x112
mov word [esp + 0xc6], 0x116
mov word [esp + 0xc8], di
mov dword [esp + 0xce], 0xffffffff
mov word [esp + 0xd2], 0x111
mov word [esp + 0xd4], di
mov dword [esp + 0xda], 0x400
mov word [esp + 0xde], 0x117
mov word [esp + 0xe0], di
mov word [esp + 0xea], si
mov word [esp + 0xec], si
mov dword [esp + 0xee], esi
mov dword [esp + 0xf2], esi
push eax
mov eax, dword [ebx + 0x14]
push eax
mov eax, dword [ebx + 0x10]
push eax
mov eax, dword [ebx + 0xc]
push eax
mov eax, dword [ebx + 8]
push eax
push edx
push ecx
lea ecx, [esp + 0x122]
push str.C:_d_R:_d_X0:_.9lf_Y0:_.9lf_Gsd:_.6lf_Kap:_.9lf
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [ebp + 8]
push 0xc0000000
push edx
call fcn.00415ce0
mov edi, eax
add esp, 0x3c
cmp edi, esi
je 0x415e99
cmp edi, 0xffffffff
je 0x415e99
lea eax, [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x48]
push 0x400
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x30]
mov esi, dword [ebx + 0x38]
lea edx, [eax - 1]
imul edx, ecx
shl ecx, 2
lea edx, [esi + edx*4]
xor esi, esi
test eax, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
jle 0x416528
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push 0
push edx
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x34]
inc esi
sub ecx, edx
cmp esi, eax
mov dword [esp + 0x10], ecx
jl 0x4164fa
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x440]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x444]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
mov edi, str..tfw
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x44cc1c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x44c]
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415e99
fld qword [ebx + 0x18]
fld st(0)
fcos
mov ecx, dword [ebx + 0x34]
fstp qword [esp + 0x18]
fsin
fld qword [esp + 0x18]
fmul qword [ebx + 0x20]
fstp qword [esp + 0x28]
fld st(0)
fmul qword [ebx + 0x20]
fstp qword [esp + 0x38]
fld st(0)
fmul qword [ebx + 0x28]
fstp qword [esp + 0x30]
fld qword [esp + 0x18]
fmul qword [ebx + 0x28]
fchs
fst qword [esp + 0x10]
fcomp qword [0x442618]
fnstsw ax
test ah, 1
jne 0x416600
fstp st(0)
fld qword [ebx + 8]
jmp 0x416613
lea edx, [ecx - 1]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fmulp st(1)
fmul qword [ebx + 0x28]
fsubr qword [ebx + 8]
fld qword [esp + 0x10]
fcomp qword [0x442618]
fnstsw ax
test ah, 1
jne 0x416629
fld qword [ebx + 0x10]
jmp 0x41663c
dec ecx
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fmul qword [esp + 0x18]
fmul qword [ebx + 0x28]
fadd qword [ebx + 0x10]
fld qword [esp + 0x28]
fmul qword [0x442540]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
fsubr st(2)
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push eax
push ecx
push str._t_.12lf_n
fstp qword [esp + 0x2c]
fld qword [esp + 0x1c]
fmul qword [0x442540]
push esi
fsubr st(1)
fstp qword [esp + 0x28]
fstp st(0)
fstp st(0)
call edi
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
push edx
push eax
push str._t_.12lf_n
push esi
call edi
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push ecx
push edx
push str._t_.12lf_n
push esi
call edi
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push eax
push ecx
push str._t_.12lf_n
push esi
call edi
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
add esp, 0x40
push edx
push eax
push str._t_.12lf_n
push esi
call edi
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
push str._t_.12lf_n
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x24
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc