Function at 0x4165db
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffcac
push ebx
push esi
push edi
mov ebx, 0x4c8636
xor eax, eax
mov dword [ebp - 0x20], eax
xor edx, edx
mov dword [ebp - 0x38], edx
push 0x4e2b98
lea ecx, [ebp - 0x14c]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
push 0x4e2b98
lea eax, [ebp - 0x250]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
lea edx, [ebx + 0xea]
push edx
lea ecx, [ebp - 0x250]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
lea eax, [ebx + 0xef]
push eax
lea edx, [ebp - 0x250]
push edx
call sub.cw3220.DLL__fopen
add esp, 8
mov edi, eax
test eax, eax
jne 0x416658
or eax, 0xffffffff
jmp 0x416e20
lea edx, [ebx + 0xfa]
push edx
lea ecx, [ebx + 0xf1]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
test eax, eax
jne 0x41667c
or eax, 0xffffffff
jmp 0x416e20
push 0
push 0
lea edx, [ebx + 0xfd]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x10
mov dword [ebp - 4], 0xc2b40000
mov dword [ebp - 8], 0xc2700000
lea edx, [ebp - 0x17]
push edx
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0041605b
add esp, 0xc
mov dl, byte [ebp - 0x15]
mov byte [ebp - 0x39], dl
mov cl, byte [ebp - 0x16]
mov byte [ebp - 0x3a], cl
mov al, byte [ebp - 0x17]
or al, byte [0x4c858c]
mov byte [ebp - 0x3b], al
mov dword [ebp - 4], 0x42b40000
mov dword [ebp - 8], 0x42700000
lea eax, [ebp - 0x17]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0041605b
add esp, 0xc
mov al, byte [ebp - 0x15]
mov byte [ebp - 0x3c], al
mov dl, byte [ebp - 0x16]
mov byte [ebp - 0x3d], dl
mov cl, byte [ebp - 0x17]
or cl, byte [0x4c858c]
mov byte [ebp - 0x3e], cl
xor eax, eax
mov dword [ebp - 0x1c], eax
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 4]
push ecx
lea eax, [ebp - 0x14]
push eax
lea edx, [ebx + 0x102]
push edx
push edi
call sub.cw3220.DLL__fscanf
add esp, 0x14
test eax, eax
je 0x416a91
inc eax
je 0x416a91
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
fld dword [0x416e27]
fst dword [ebp - 0x30]
fstp dword [ebp - 0x2c]
push edi
call sub.cw3220.DLL__rewind
pop ecx
jmp 0x416a87
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 4]
push ecx
lea eax, [ebp - 0x14]
push eax
lea edx, [ebx + 0x109]
push edx
push edi
call sub.cw3220.DLL__fscanf
add esp, 0x14
test eax, eax
je 0x416a91
inc eax
je 0x416a91
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x14], 2
jge 0x416899
fld dword [ebp - 4]
fsub dword [ebp - 0xc]
fmul dword [0x416e2b]
fadd dword [ebp - 0x2c]
fstp dword [ebp - 0x24]
fld dword [ebp - 8]
fsub dword [ebp - 0x10]
fmul dword [0x416e2b]
fadd dword [ebp - 0x30]
fstp dword [ebp - 0x28]
push dword [ebp - 0x24]
call fcn.004b4d40
pop ecx
mov dword [ebp - 0x34c], eax
fild dword [ebp - 0x34c]
fstp qword [ebp - 0x354]
fld dword [ebp - 0x24]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x416e2f]
fmul qword [ebp - 0x354]
call sub.cw3220.DLL___ftol
mov dword [ebp - 0x34], eax
push dword [ebp - 0x28]
call fcn.004b4d40
pop ecx
mov dword [ebp - 0x34c], eax
fild dword [ebp - 0x34c]
fstp qword [ebp - 0x354]
fld dword [ebp - 0x28]
add esp, 0xfffffff8
fstp qword [esp]
call sub.cw3220.DLL__fabs
add esp, 8
fadd dword [0x416e2f]
fmul qword [ebp - 0x354]
call sub.cw3220.DLL___ftol
fild dword [ebp - 0x34]
fsubr dword [ebp - 0x24]
fstp dword [ebp - 0x2c]
mov dword [ebp - 0x34c], eax
fild dword [ebp - 0x34c]
fsubr dword [ebp - 0x28]
fstp dword [ebp - 0x30]
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
lea edx, [ebp - 0x17]
push edx
fild dword [ebp - 0x34]
add esp, 0xfffffffc
fstp dword [esp]
mov dword [ebp - 0x34c], eax
fild dword [ebp - 0x34c]
add esp, 0xfffffffc
fstp dword [esp]
call fcn.0041605b
add esp, 0xc
push 0x18
push 0x32
call sub.cw3220.DLL__gotoxy
add esp, 8
push dword [ebp - 0x1c]
lea eax, [ebx + 0x110]
push eax
call sub.cw3220.DLL__printf
add esp, 8
mov ecx, dword [ebp - 0x14]
cmp ecx, 4
ja case.default.0x4168a5
jmp dword [ecx*4 + 0x4168ac]
mov al, byte [0x4c858a]
or byte [ebp - 0x17], al
jmp 0x416a65
mov dl, byte [0x4c858c]
or byte [ebp - 0x17], dl
jmp 0x416a65
fld dword [ebp - 4]
call sub.cw3220.DLL___ftol
movsx edx, al
inc edx
jge 0x4168eb
xor eax, eax
movsx edx, al
cmp edx, 6
jle 0x4168f5
mov al, 6
movsx edx, al
inc edx
jne 0x416964
mov dword [ebp - 0x38], 1
xor ecx, ecx
mov cl, byte [ebp - 0x3b]
push ecx
xor eax, eax
mov al, byte [ebp - 0x3a]
push eax
xor edx, edx
mov dl, byte [ebp - 0x39]
push edx
lea ecx, [ebx + 0x114]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor eax, eax
mov al, byte [ebp - 0x3b]
push eax
xor edx, edx
mov dl, byte [ebp - 0x3a]
push edx
xor ecx, ecx
mov cl, byte [ebp - 0x39]
push ecx
lea eax, [ebx + 0x11b]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
push 0x9c
push 0
push 0
lea edx, [ebx + 0x122]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x416a10
cmp dword [ebp - 0x38], 0
je 0x4169ce
push 0x9e
push 0
push 0
lea ecx, [ebx + 0x129]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor eax, eax
mov al, byte [ebp - 0x3e]
push eax
xor edx, edx
mov dl, byte [ebp - 0x3d]
push edx
xor ecx, ecx
mov cl, byte [ebp - 0x3c]
push ecx
lea eax, [ebx + 0x130]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor edx, edx
mov dl, byte [ebp - 0x3e]
push edx
xor ecx, ecx
mov cl, byte [ebp - 0x3d]
push ecx
xor eax, eax
mov al, byte [ebp - 0x3c]
push eax
lea edx, [ebx + 0x137]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor ecx, ecx
mov dword [ebp - 0x38], ecx
jmp 0x416a10
movsx edx, al
cmp edx, 6
jge 0x4169f7
movsx eax, al
add eax, eax
add eax, 0x84
push eax
push 0
push 0
lea ecx, [ebx + 0x13e]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x416a10
push 0x92
push 0
push 0
lea eax, [ebx + 0x145]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
inc dword [ebp - 0x20]
jmp 0x416a87
push 0x9a
push 0
push 0
lea edx, [ebx + 0x14c]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x416a87
push 0x96
push 0
push 0
lea ecx, [ebx + 0x153]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
jmp 0x416a87
push dword [ebp - 0x14]
lea eax, [ebx + 0x15a]
push eax
call sub.cw3220.DLL__printf
add esp, 8
or eax, 0xffffffff
jmp 0x416e20
xor edx, edx
mov dl, byte [ebp - 0x17]
push edx
xor ecx, ecx
mov cl, byte [ebp - 0x16]
push ecx
xor eax, eax
mov al, byte [ebp - 0x15]
push eax
lea edx, [ebx + 0x170]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
test byte [edi + 0x12], 0x20
je 0x416754
push 0x91
push 0
push 0
lea ecx, [ebx + 0x177]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
push 0x40
push 0xe5
lea eax, [ebp - 0x2d0]
push eax
call sub.cw3220.DLL__memset
add esp, 0xc
push esi
push 1
push 0x40
lea edx, [ebp - 0x2d0]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push esi
push 1
push 0x40
lea ecx, [ebp - 0x2d0]
push ecx
call sub.cw3220.DLL__fwrite
add esp, 0x10
push esi
push 1
push 0x40
lea eax, [ebp - 0x2d0]
push eax
call sub.cw3220.DLL__fwrite
add esp, 0x10
push esi
push 1
push 0x40
lea edx, [ebp - 0x2d0]
push edx
call sub.cw3220.DLL__fwrite
add esp, 0x10
inc dword [ebp - 0x1c]
push esi
call sub.cw3220.DLL__fclose
pop ecx
push edi
call sub.cw3220.DLL__fclose
pop ecx
cmp dword [0x4cecf4], 5
jne 0x416ded
push 0
lea ecx, [ebp - 0x48]
push ecx
push 0
push 0
push 0x4e2b98
call sub.cw3220.DLL__fnsplit
add esp, 0x14
lea eax, [ebx + 0x17e]
push eax
lea edx, [ebp - 0x2e4]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [ebp - 0x48]
push ecx
lea eax, [ebp - 0x2e4]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
lea edx, [ebp - 0x48]
push edx
call sub.cw3220.DLL__strlen
pop ecx
mov byte [ebp + eax - 0x2e4], 0x20
lea ecx, [ebx + 0x194]
push ecx
lea eax, [ebx + 0x18f]
push eax
call sub.cw3220.DLL__fopen
add esp, 8
mov esi, eax
lea eax, [ebp - 0x2e4]
push eax
lea edx, [ebx + 0x197]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [ebx + 0x19d]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push dword [ebp - 0x1c]
lea eax, [ebx + 0x1a3]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea edx, [ebx + 0x1a8]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push dword [ebp - 0x20]
lea ecx, [ebx + 0x1ae]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea eax, [ebx + 0x1b2]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea edx, [ebx + 0x1b8]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [ebx + 0x1bc]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea eax, [ebx + 0x1c2]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea edx, [ebx + 0x1c6]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea ecx, [ebx + 0x1cc]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea eax, [ebx + 0x1d0]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea edx, [ebx + 0x1d6]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [ebx + 0x1da]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
lea eax, [ebx + 0x1e0]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
push 0
lea edx, [ebx + 0x1e2]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [ebx + 0x1e6]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
lea eax, [ebx + 0x1ec]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 8
push 0
lea edx, [ebx + 0x1ee]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea ecx, [ebx + 0x1f2]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea eax, [ebx + 0x1f9]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0xd
lea edx, [ebx + 0x1fd]
push edx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0
lea ecx, [ebx + 0x204]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
push 0x1a
push 0xd
push 0xd
lea eax, [ebx + 0x208]
push eax
push esi
call sub.cw3220.DLL__fprintf
add esp, 0x14
xor edx, edx
mov dword [ebp - 0x14], edx
push 0
lea ecx, [ebx + 0x21b]
push ecx
push esi
call sub.cw3220.DLL__fprintf
add esp, 0xc
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0x17e
jl 0x416d54
push esi
call sub.cw3220.DLL__fclose
pop ecx
mov eax, dword [0x4cecf8]
lea eax, [eax + eax*2]
add eax, 0x4d615c
push eax
lea edx, [ebp - 0x348]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
push 0x4e2b98
lea ecx, [ebp - 0x348]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
lea eax, [ebx + 0x21e]
push eax
lea edx, [ebp - 0x348]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
lea ecx, [ebp - 0x348]
push ecx
lea eax, [ebx + 0x228]
push eax
lea edx, [ebx + 0x223]
push edx
call fcn.0047f158
add esp, 0xc
lea ecx, [ebx + 0x231]
push ecx
call sub.cw3220.DLL__unlink
pop ecx
jmp 0x416dfa
lea eax, [ebx + 0x236]
push eax
call fcn.00416e43
pop ecx
lea edx, [ebx + 0x23f]
push edx
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