Function at 0x4140c7
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff80
push ebx
push esi
push edi
mov edi, 0x4c8400
xor eax, eax
mov dword [ebp - 4], eax
push 0x4e2b98
lea edx, [ebp - 0x60]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [edi + 0x28]
push ecx
lea eax, [ebp - 0x60]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [edi + 0x2d]
push edx
lea ecx, [ebp - 0x60]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
test eax, eax
jne 0x414123
lea edx, [edi + 0x30]
push edx
call sub.cw3220.DLL__printf
pop ecx
or eax, 0xffffffff
jmp 0x4143c7
mov edx, dword [0x4cecf8]
lea edx, [edx + edx*2]
add edx, 0x4d615c
push edx
lea ecx, [ebp - 0x60]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
push 0x4e2b98
lea eax, [ebp - 0x60]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [edi + 0x5c]
push edx
lea ecx, [ebp - 0x60]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
xor eax, eax
mov dword [0x4e2b88], eax
lea edx, [edi + 0x61]
push edx
lea ecx, [ebp - 0x60]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov ebx, eax
cmp dword [0x4e2b88], 1
je 0x414160
cmp dword [0x4e2b88], 2
jne 0x41419a
push esi
call sub.cw3220.DLL__fclose
pop ecx
or eax, 0xffffffff
jmp 0x4143c7
test ebx, ebx
jne 0x4141ad
push esi
call sub.cw3220.DLL__fclose
pop ecx
or eax, 0xffffffff
jmp 0x4143c7
push 0x20
push 0
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__memset
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
push ebx
push 0x20
push 1
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 4
jl 0x4141c2
lea edx, [ebp - 0x24]
push edx
lea ecx, [ebp - 0x20]
push ecx
lea eax, [ebp - 0x10]
push eax
lea edx, [edi + 0x64]
push edx
push esi
call sub.cw3220.DLL__fscanf
add esp, 0x14
xor ecx, ecx
mov word [ebp - 0x14], cx
mov word [ebp - 0x12], cx
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
mov dword [ebp - 8], 1
jmp 0x4142ef
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x10]
push ecx
lea eax, [edi + 0x6e]
push eax
push esi
call sub.cw3220.DLL__fscanf
add esp, 0x14
mov edx, dword [ebp - 0x10]
sub edx, 1
jb 0x41425c
je 0x4142ef
dec edx
je 0x4142b9
jmp 0x4142ef
fld dword [ebp - 0x18]
fsub dword [ebp - 0x20]
fmul dword [0x4143cf]
fadd dword [0x4143d3]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x12], ax
fld dword [ebp - 0x1c]
fsub dword [ebp - 0x24]
fmul dword [0x4143cf]
fadd dword [0x4143d3]
call sub.cw3220.DLL___ftol
mov word [ebp - 0x14], ax
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]
jmp 0x4142ef
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
inc eax
imul edx, eax, 0x64
mov word [ebp - 0x12], dx
mov word [ebp - 0x14], 0x7531
push ebx
push 1
push 2
lea ecx, [ebp - 0x12]
push ecx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push ebx
push 1
push 2
lea eax, [ebp - 0x14]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
test byte [esi + 0x12], 0x20
je 0x41422d
mov word [ebp - 0x12], 0
mov word [ebp - 0x14], 0x7532
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
push 0x4e2dbc
call sub.cw3220.DLL__strlen
pop ecx
push eax
push 0x4e2dbc
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__memcpy
add esp, 0xc
push 4
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 0x72]
push ecx
call sub.cw3220.DLL__memcpy
add esp, 0xc
push 2
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0x6c]
push edx
call sub.cw3220.DLL__memcpy
add esp, 0xc
movsx ecx, byte [esi + 0x16]
push ecx
call sub.cw3220.DLL__filelength
pop ecx
mov dword [ebp - 0xc], eax
push 4
lea eax, [ebp - 0xc]
push eax
lea edx, [ebp - 0x6a]
push edx
call sub.cw3220.DLL__memcpy
add esp, 0xc
push ebx
call sub.cw3220.DLL__rewind
pop ecx
push ebx
push 1
push 0x20
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push ebx
call sub.cw3220.DLL__fclose
pop ecx
push esi
call sub.cw3220.DLL__fclose
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