Function at 0x41e372
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffba4
push ebx
push esi
push edi
mov edi, 0x4ca5fa
xor eax, eax
mov dword [ebp - 0x28], eax
xor edx, edx
mov dword [ebp - 0x50], edx
xor ecx, ecx
mov dword [ebp - 0x54], ecx
push 0x4e2b98
lea eax, [ebp - 0x164]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
push 0x4e2b98
lea edx, [ebp - 0x268]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [edi + 0xc8]
push ecx
lea eax, [ebp - 0x268]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [edi + 0xcd]
push edx
lea ecx, [ebp - 0x268]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x41e3f5
or eax, 0xffffffff
jmp 0x41ed9a
lea edx, [edi + 0xd8]
push edx
lea ecx, [edi + 0xcf]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
test eax, eax
jne 0x41e419
or eax, 0xffffffff
jmp 0x41ed9a
xor edx, edx
mov dl, byte [0x4ca496]
push edx
xor ecx, ecx
mov cl, byte [0x4ca495]
push ecx
xor eax, eax
mov al, byte [0x4ca494]
push eax
lea edx, [edi + 0xdb]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x1c]
push ecx
lea eax, [edi + 0xe2]
push eax
push dword [ebp - 0x2c]
call sub.cw3220.DLL__fscanf
add esp, 0x14
mov ebx, eax
test ebx, ebx
je 0x41e79f
inc ebx
je 0x41e79f
mov dword [ebp - 0x44], 0x4b189680
mov dword [ebp - 0x4c], 0x4b189680
mov dword [ebp - 0x40], 0xcb189680
mov dword [ebp - 0x48], 0xcb189680
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 8]
mov dword [ebp - 0x18], edx
fld dword [0x41eda2]
fst dword [ebp - 0x3c]
fstp dword [ebp - 0x38]
push dword [ebp - 0x2c]
call sub.cw3220.DLL__rewind
pop ecx
jmp 0x41e792
lea ecx, [ebp - 8]
push ecx
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0x1c]
push edx
lea ecx, [edi + 0xe9]
push ecx
push dword [ebp - 0x2c]
call sub.cw3220.DLL__fscanf
add esp, 0x14
mov ebx, eax
test ebx, ebx
je 0x41e79f
inc ebx
je 0x41e79f
inc dword [ebp - 0x24]
cmp dword [ebp - 0x1c], 2
jge 0x41e683
fld dword [ebp - 4]
fsub dword [ebp - 0x14]
fmul dword [0x41eda6]
fadd dword [ebp - 0x38]
fstp dword [ebp - 0x30]
fld dword [ebp - 8]
fsub dword [ebp - 0x18]
fmul dword [0x41eda6]
fadd dword [ebp - 0x3c]
fstp dword [ebp - 0x34]
push dword [ebp - 0x30]
call fcn.004b4d40
pop ecx
mov dword [ebp - 0x454], eax
fild dword [ebp - 0x454]
fstp qword [ebp - 0x45c]
fld dword [ebp - 0x30]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
fmul qword [ebp - 0x45c]
call sub.cw3220.DLL___ftol
mov ebx, eax
push dword [ebp - 0x34]
call fcn.004b4d40
pop ecx
mov dword [ebp - 0x454], eax
fild dword [ebp - 0x454]
fstp qword [ebp - 0x45c]
fld dword [ebp - 0x34]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
fmul qword [ebp - 0x45c]
call sub.cw3220.DLL___ftol
mov edx, eax
mov dword [ebp - 0x454], ebx
fild dword [ebp - 0x454]
fsubr dword [ebp - 0x30]
fstp dword [ebp - 0x38]
mov dword [ebp - 0x454], edx
fild dword [ebp - 0x454]
fsubr dword [ebp - 0x34]
fstp dword [ebp - 0x3c]
fld dword [ebp - 4]
fsub dword [ebp - 0xc]
fcomp dword [ebp - 0x44]
fnstsw ax
sahf
jae 0x41e5de
fld dword [ebp - 4]
fsub dword [ebp - 0xc]
fstp dword [ebp - 0x44]
fld dword [ebp - 4]
fsub dword [ebp - 0xc]
fcomp dword [ebp - 0x40]
fnstsw ax
sahf
jbe 0x41e5f5
fld dword [ebp - 4]
fsub dword [ebp - 0xc]
fstp dword [ebp - 0x40]
fld dword [ebp - 8]
fsub dword [ebp - 0x10]
fcomp dword [ebp - 0x4c]
fnstsw ax
sahf
jae 0x41e60c
fld dword [ebp - 8]
fsub dword [ebp - 0x10]
fstp dword [ebp - 0x4c]
fld dword [ebp - 8]
fsub dword [ebp - 0x10]
fcomp dword [ebp - 0x48]
fnstsw ax
sahf
jbe 0x41e623
fld dword [ebp - 8]
fsub dword [ebp - 0x10]
fstp dword [ebp - 0x48]
add dword [ebp - 0x50], ebx
add dword [ebp - 0x54], edx
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x1f]
push ecx
mov dword [ebp - 0x454], edx
fild dword [ebp - 0x454]
add esp, 0xfffffffc
fstp dword [esp]
mov dword [ebp - 0x458], ebx
fild dword [ebp - 0x458]
add esp, 0xfffffffc
fstp dword [esp]
call fcn.0041edae
add esp, 0xc
push 0x18
push 0x32
call sub.cw3220.DLL__gotoxy
add esp, 8
push dword [ebp - 0x24]
lea edx, [edi + 0xf0]
push edx
call sub.cw3220.DLL__printf
add esp, 8
mov eax, dword [ebp - 0x1c]
cmp eax, 4
ja case.default.0x41e68f
jmp dword [eax*4 + 0x41e696]
mov dl, byte [0x4ca4a6]
or byte [ebp - 0x1f], dl
jmp 0x41e770
mov cl, byte [0x4ca4a8]
or byte [ebp - 0x1f], cl
jmp 0x41e770
fld dword [ebp - 4]
call sub.cw3220.DLL___ftol
or al, byte [0x4ca49a]
xor edx, edx
mov dl, byte [0x4ca49c]
push edx
xor ecx, ecx
mov cl, byte [0x4ca49b]
push ecx
and eax, 0xff
push eax
lea edx, [edi + 0xf4]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
inc dword [ebp - 0x28]
jmp 0x41e792
xor ecx, ecx
mov cl, byte [0x4ca4b1]
push ecx
xor eax, eax
mov al, byte [0x4ca4b0]
push eax
xor edx, edx
mov dl, byte [0x4ca4af]
push edx
lea ecx, [edi + 0xfb]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x41e792
xor eax, eax
mov al, byte [0x4ca4ae]
push eax
xor edx, edx
mov dl, byte [0x4ca4ad]
push edx
xor ecx, ecx
mov cl, byte [0x4ca4ac]
push ecx
lea eax, [edi + 0x102]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x41e792
push dword [ebp - 0x1c]
lea edx, [edi + 0x109]
push edx
call sub.cw3220.DLL__printf
add esp, 8
jmp 0x41e792
xor ecx, ecx
mov cl, byte [ebp - 0x1d]
push ecx
xor eax, eax
mov al, byte [ebp - 0x1e]
push eax
xor edx, edx
mov dl, byte [ebp - 0x1f]
push edx
lea ecx, [edi + 0x11f]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
mov eax, dword [ebp - 0x2c]
test byte [eax + 0x12], 0x20
je 0x41e4c5
push 0
push 0
xor edx, edx
mov dl, byte [0x4ca48e]
push edx
lea ecx, [edi + 0x126]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
inc dword [ebp - 0x24]
push esi
call sub.cw3220.DLL__fclose
pop ecx
push dword [ebp - 0x2c]
call sub.cw3220.DLL__fclose
pop ecx
lea eax, [edi + 0x132]
push eax
lea edx, [edi + 0x12d]
push edx
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
mov eax, dword [ebp + 8]
dec eax
je 0x41e955
dec eax
jne 0x41ed67
push 0x80
push 0x30
lea edx, [ebp - 0x338]
push edx
call sub.cw3220.DLL__memset
add esp, 0xc
push esi
push 1
push 0x80
lea ecx, [ebp - 0x338]
push ecx
call sub.cw3220.DLL__fwrite
add esp, 0x10
fld dword [ebp - 0x44]
fmul dword [0x41eda6]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x338], ax
fld dword [ebp - 0x4c]
fmul dword [0x41eda6]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x336], ax
fld dword [ebp - 0x40]
fmul dword [0x41eda6]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x334], ax
fld dword [ebp - 0x48]
fmul dword [0x41eda6]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x332], ax
mov word [ebp - 0x330], 0
mov word [ebp - 0x32e], 0
push 4
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x32c]
push ecx
call sub.cw3220.DLL__memmove
add esp, 0xc
mov word [ebp - 0x328], 0
mov word [ebp - 0x326], 0
mov word [ebp - 0x324], 0
mov word [ebp - 0x322], 0
mov word [ebp - 0x320], 0
mov word [ebp - 0x31e], 0
mov word [ebp - 0x31c], 0
mov word [ebp - 0x31a], 0
push 0x60
push 0
lea eax, [ebp - 0x318]
push eax
call sub.cw3220.DLL__memset
add esp, 0xc
push esi
push 1
push 0x80
lea edx, [ebp - 0x338]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push esi
call sub.cw3220.DLL__fclose
pop ecx
lea ecx, [ebp - 0x164]
push ecx
lea eax, [edi + 0x13a]
push eax
lea edx, [edi + 0x135]
push edx
call fcn.0047f158
add esp, 0xc
lea ecx, [ebp - 0x164]
push ecx
call fcn.0041f812
pop ecx
lea eax, [ebp - 0x164]
push eax
call sub.cw3220.DLL__unlink
pop ecx
jmp 0x41ed67
push 0
lea edx, [ebp - 0x60]
push edx
push 0
push 0
push 0x4e2dbc
call sub.cw3220.DLL__fnsplit
add esp, 0x14
lea ecx, [edi + 0x143]
push ecx
lea eax, [ebp - 0x34c]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
lea edx, [ebp - 0x60]
push edx
lea ecx, [ebp - 0x34c]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [ebp - 0x60]
push eax
call sub.cw3220.DLL__strlen
pop ecx
mov byte [ebp + eax - 0x34c], 0x20
lea edx, [ebp - 0x34c]
push edx
lea ecx, [edi + 0x154]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea eax, [edi + 0x15a]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push dword [ebp - 0x24]
lea edx, [edi + 0x160]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [edi + 0x165]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push dword [ebp - 0x28]
lea eax, [edi + 0x16b]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea edx, [edi + 0x16f]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
fld dword [0x41eda6]
fmul dword [ebp - 0x40]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
call sub.cw3220.DLL___ftol
push eax
lea edx, [edi + 0x175]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [edi + 0x179]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
fld dword [0x41eda6]
fmul dword [ebp - 0x44]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
call sub.cw3220.DLL___ftol
push eax
lea edx, [edi + 0x17f]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [edi + 0x183]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
fld dword [0x41eda6]
fmul dword [ebp - 0x48]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
call sub.cw3220.DLL___ftol
push eax
lea edx, [edi + 0x189]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [edi + 0x18d]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
fld dword [0x41eda6]
fmul dword [ebp - 0x4c]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x41edaa]
call sub.cw3220.DLL___ftol
push eax
lea edx, [edi + 0x193]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [edi + 0x197]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
cmp dword [ebp - 0x50], 0
jl 0x41eb46
lea eax, [edi + 0x19d]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
jmp 0x41eb56
lea edx, [edi + 0x19f]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
push dword [ebp - 0x50]
call fcn.004170de
pop ecx
push eax
lea ecx, [edi + 0x1a1]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea eax, [edi + 0x1a5]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
cmp dword [ebp - 0x54], 0
jl 0x41eb9a
lea edx, [edi + 0x1ab]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
jmp 0x41ebaa
lea ecx, [edi + 0x1ad]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
push dword [ebp - 0x54]
call fcn.004170de
pop ecx
push eax
lea eax, [edi + 0x1af]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea edx, [edi + 0x1b3]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea ecx, [edi + 0x1ba]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea eax, [edi + 0x1be]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea edx, [edi + 0x1c5]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0x1a
push 0xd
push 0xd
lea ecx, [edi + 0x1c9]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
mov ebx, 1
lea eax, [edi + 0x1dc]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
inc ebx
cmp ebx, 0x180
jle 0x41ec27
push esi
call sub.cw3220.DLL__fclose
pop ecx
lea edx, [edi + 0x1de]
push edx
lea ecx, [ebp - 0x450]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
mov ebx, 1
jmp 0x41ecd6
inc ebx
cmp ebx, 0x25
jne 0x41ec89
push 0x4e3700
push 0xcb
call fcn.0048e144
add esp, 8
call fcn.00491684
or eax, 0xffffffff
jmp 0x41ed9a
cmp ebx, 0xa
jge 0x41eca7
push ebx
lea edx, [edi + 0x1e9]
push edx
lea ecx, [ebp - 0x2b8]
push ecx
call sub.cw3220.DLL__sprintf
add esp, 0xc
jmp 0x41ecbe
push ebx
lea eax, [edi + 0x1ed]
push eax
lea edx, [ebp - 0x2b8]
push edx
call sub.cw3220.DLL__sprintf
add esp, 0xc
push 2
lea ecx, [ebp - 0x2b8]
push ecx
lea eax, [ebp - 0x44c]
push eax
call sub.cw3220.DLL__strncpy
add esp, 0xc
push 0
lea edx, [ebp - 0x450]
push edx
call sub.cw3220.DLL__access
add esp, 8
test eax, eax
je 0x41ec64
push 0x18
push 0x32
call sub.cw3220.DLL__gotoxy
add esp, 8
push ebx
lea ecx, [edi + 0x1f0]
push ecx
call sub.cw3220.DLL__printf
add esp, 8
mov word [0x4e2b88], 0
lea eax, [edi + 0x1fa]
push eax
lea edx, [ebp - 0x450]
push edx
call sub.cw3220.DLL__fopen
add esp, 8
cmp word [0x4e2b88], 1
je 0x41ed0b
cmp word [0x4e2b88], 2
jne 0x41ed43
or eax, 0xffffffff
jmp 0x41ed9a
push eax
call sub.cw3220.DLL__fclose
pop ecx
lea edx, [ebp - 0x450]
push edx
lea ecx, [edi + 0x201]
push ecx
lea eax, [edi + 0x1fc]
push eax
call fcn.0047f158
add esp, 0xc
lea edx, [edi + 0x20a]
push edx
call sub.cw3220.DLL__unlink
pop ecx
lea ecx, [edi + 0x20f]
push ecx
call sub.cw3220.DLL__unlink
pop ecx
push 0x4e3700
push 0xc8
call fcn.0048e144
add esp, 8
call fcn.00491684
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret