Function at 0x41557b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda4
push ebx
push esi
push edi
mov edi, 0x4c8400
xor eax, eax
mov dword [ebp - 4], eax
push 0x4e2b98
lea edx, [ebp - 0x138]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [edi + 0x106]
push ecx
lea eax, [ebp - 0x138]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [edi + 0x10b]
push edx
lea ecx, [ebp - 0x138]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
test eax, eax
jne 0x4155df
or eax, 0xffffffff
jmp 0x4158c1
mov edx, dword [0x4cecf8]
lea edx, [edx + edx*2]
add edx, 0x4d615c
push edx
lea ecx, [ebp - 0x138]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
push 0x4e2b98
lea eax, [ebp - 0x138]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [edi + 0x10e]
push edx
lea ecx, [ebp - 0x138]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
xor eax, eax
mov dword [0x4e2b88], eax
lea edx, [edi + 0x113]
push edx
lea ecx, [ebp - 0x138]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov ebx, eax
cmp dword [0x4e2b88], 1
je 0x415628
cmp dword [0x4e2b88], 2
jne 0x415668
push esi
call sub.cw3220.DLL__fclose
pop ecx
or eax, 0xffffffff
jmp 0x4158c1
test ebx, ebx
jne 0x41567b
push esi
call sub.cw3220.DLL__fclose
pop ecx
or eax, 0xffffffff
jmp 0x4158c1
push 0x20
push 0
lea edx, [ebp - 0x25c]
push edx
call sub.cw3220.DLL__memset
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
push ebx
push 1
push 0x20
lea eax, [ebp - 0x25c]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 4
jl 0x415693
lea edx, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x18]
push ecx
lea eax, [ebp - 0x10]
push eax
lea edx, [edi + 0x116]
push edx
push esi
call sub.cw3220.DLL__fscanf
add esp, 0x14
xor ecx, ecx
mov dword [ebp - 8], ecx
jmp 0x4157a6
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x10]
push ecx
lea eax, [edi + 0x11d]
push eax
push esi
call sub.cw3220.DLL__fscanf
add esp, 0x14
mov edx, dword [ebp - 0x10]
sub edx, 1
jb 0x415708
je 0x4157a6
dec edx
je 0x41576d
jmp 0x4157a6
fld dword [ebp - 0x20]
fsub dword [ebp - 0x18]
fmul dword [0x4158cb]
fstp qword [ebp - 0x2c]
fld dword [ebp - 0x24]
fsub dword [ebp - 0x1c]
fmul dword [0x4158cb]
fstp qword [ebp - 0x34]
lea ecx, [ebp - 0x12]
push ecx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call fcn.00414d8f
add esp, 0x20
push ebx
push 1
push 2
lea eax, [ebp - 0x12]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
push ebx
push 1
push 2
lea edx, [ebp - 0x14]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
inc dword [ebp - 8]
jmp 0x4157a6
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
inc ecx
imul eax, ecx, 0x64
mov word [ebp - 0x12], ax
mov word [ebp - 0x14], 0x7531
push ebx
push 1
push 2
lea edx, [ebp - 0x12]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push ebx
push 1
push 2
lea ecx, [ebp - 0x14]
push ecx
call sub.cw3220.DLL__fwrite
add esp, 0x10
inc dword [ebp - 8]
test byte [esi + 0x12], 0x20
je 0x4156d6
push esi
call sub.cw3220.DLL__fclose
pop ecx
mov word [ebp - 0x12], 0
mov word [ebp - 0x14], 0x7532
push ebx
push 1
push 2
lea eax, [ebp - 0x12]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
push ebx
push 1
push 2
lea edx, [ebp - 0x14]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
movsx ecx, byte [ebx + 0x16]
push ecx
call sub.cw3220.DLL__filelength
pop ecx
mov dword [ebp - 0xc], eax
push ebx
call sub.cw3220.DLL__fclose
pop ecx
push 2
lea eax, [edi + 0x124]
push eax
lea edx, [ebp - 0x25c]
push edx
call sub.cw3220.DLL__memcpy
add esp, 0xc
lea ecx, [ebp - 0x23c]
push ecx
call sub.cw3220.DLL__strlen
pop ecx
push eax
lea eax, [ebp - 0x23c]
push eax
lea edx, [ebp - 0x25a]
push edx
call sub.cw3220.DLL__memcpy
add esp, 0xc
push 4
lea ecx, [ebp - 8]
push ecx
lea eax, [ebp - 0x24e]
push eax
call sub.cw3220.DLL__memcpy
add esp, 0xc
push 2
lea edx, [ebp - 4]
push edx
lea ecx, [ebp - 0x248]
push ecx
call sub.cw3220.DLL__memcpy
add esp, 0xc
push 4
lea eax, [ebp - 0xc]
push eax
lea edx, [ebp - 0x246]
push edx
call sub.cw3220.DLL__memcpy
add esp, 0xc
lea ecx, [edi + 0x127]
push ecx
lea eax, [ebp - 0x138]
push eax
call sub.cw3220.DLL__fopen
add esp, 8
mov ebx, eax
push ebx
push 1
push 0x20
lea eax, [ebp - 0x25c]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
push 0x4e3700
push 0xc8
call fcn.0048e144
add esp, 8
call fcn.00491684
push ebx
call sub.cw3220.DLL__fclose
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret