Function at 0x40c67b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x454]
sub esp, 0x4d4
mov eax, dword [0x488548]
xor eax, ebp
mov dword [ebp + 0x450], eax
mov eax, dword [ebp + 0x460]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x45c]
xor ebx, ebx
cmp dword [edi + 0x1d20], 4
mov dword [ebp - 0x6c], eax
jne 0x40c731
cmp dword [edi + 0x3814], ebx
jne 0x40c6c3
cmp eax, ebx
jne 0x40c958
xor esi, esi
inc esi
push esi
push ebx
push str.XC_cwrt
call fcn.004254c4
cmp dword [ebp - 0x6c], ebx
jne 0x40c6dd
cmp eax, ebx
jne 0x40c6e5
mov eax, esi
cmp eax, ebx
je 0x40c958
cmp eax, esi
jne 0x40c71f
push 0x21
push str.TMCFCreate_comments_file
push str.QMCFCreate_comments_file_
push dword [edi + 0xc]
call dword [sym.imp.PPLIB32W.DLL__PMessageBox_16]
cmp eax, esi
je 0x40c71f
cmp dword [edi + 0x3814], ebx
je 0x40c715
cmp dword [ebp - 0x6c], ebx
je 0x40c715
mov dword [edi + 0x3814], ebx
mov eax, 0x4c7
jmp 0x40c95a
lea eax, [edi + 0x584]
push eax
push edi
call fcn.00425c47
jmp 0x40c952
xor esi, esi
inc esi
cmp eax, ebx
jne 0x40c756
push str.00_INDEX.TXT
lea eax, [edi + 0x584]
push eax
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.PPLIB32W.DLL__CatPath_12]
lea eax, [ebp - 0x60]
mov dword [ebp - 0x6c], eax
jmp 0x40c76e
push esi
push ebx
push str.XC_cwrt
call fcn.004254c4
cmp eax, ebx
je 0x40c958
cmp eax, esi
jne 0x40c7a4
push 0x21
push str.TMCFCreate_comments_file
push str.QMCFCreate_comments_file_
push dword [edi + 0xc]
call dword [sym.imp.PPLIB32W.DLL__PMessageBox_16]
cmp eax, esi
je 0x40c7a4
add edi, 0x3814
cmp dword [edi], ebx
je 0x40c715
lea eax, [ebp - 0x60]
cmp dword [ebp - 0x6c], eax
je 0x40c715
mov dword [edi], ebx
jmp 0x40c715
mov esi, dword [ebp - 0x6c]
push esi
call dword [sym.imp.PPLIB32W.DLL__GetFileAttributesL_4]
mov dword [ebp - 0x74], eax
cmp eax, 0xffffffff
je 0x40c7c5
test al, 2
je 0x40c7c5
and eax, 0xfffffffd
push eax
push esi
call dword [sym.imp.PPLIB32W.DLL__SetFileAttributesL_8]
push ebx
push 0x8000000
push 2
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.PPLIB32W.DLL__CreateFileL_28]
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
jne 0x40c80b
cmp dword [ebp - 0x74], eax
je 0x40c7f2
push dword [ebp - 0x74]
push esi
call dword [sym.imp.PPLIB32W.DLL__SetFileAttributesL_8]
push str.TMCFCreate_comments_file
mov edx, 0x1fffffff
mov ecx, edi
call fcn.00427caa
push 5
pop eax
jmp 0x40c95a
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [ebp - 0x68]
push ecx
push 2
push 0x4758e4
push eax
call esi
cmp dword [edi + 0x1d58], ebx
mov dword [ebp - 0x78], ebx
jle 0x40c937
mov dword [ebp - 0x70], ebx
mov eax, dword [edi + 0x1d34]
mov ecx, dword [ebp - 0x70]
add eax, ecx
cmp dword [eax + 0x10], 0xffffffff
je 0x40c91e
add eax, 0x50
push 0x20
push eax
call fcn.0046891a
pop ecx
pop ecx
mov dword [ebp - 0x7c], eax
cmp eax, ebx
je 0x40c86c
push ebx
lea eax, [ebp - 0x68]
push eax
push 2
push 0x4758e0
push dword [ebp - 0x64]
call esi
mov eax, dword [edi + 0x1d34]
mov ecx, dword [ebp - 0x70]
lea ecx, [ecx + eax + 0x50]
mov eax, ecx
lea edx, [eax + 2]
mov dword [ebp - 0x80], edx
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x40c881
sub eax, dword [ebp - 0x80]
push ebx
sar eax, 1
lea edx, [ebp - 0x68]
push edx
add eax, eax
push eax
push ecx
push dword [ebp - 0x64]
call esi
push ebx
lea eax, [ebp - 0x68]
push eax
cmp dword [ebp - 0x7c], ebx
je 0x40c8b1
push 4
push 0x4758d8
jmp 0x40c8b8
push 2
push 0x4758d4
push dword [ebp - 0x64]
call esi
mov eax, dword [edi + 0x1d34]
mov ecx, dword [ebp - 0x70]
mov ebx, dword [ecx + eax + 0x10]
add ebx, dword [edi + 0x2248]
cmp word [ebx], 0x20
jne 0x40c8e8
push 0
lea eax, [ebp - 0x68]
push eax
push 2
push 0x4758e0
push dword [ebp - 0x64]
call esi
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40c8ed
sub eax, edx
push 0
sar eax, 1
lea ecx, [ebp - 0x68]
push ecx
add eax, eax
push eax
push ebx
push dword [ebp - 0x64]
call esi
push 0
lea eax, [ebp - 0x68]
push eax
push 4
push 0x4758cc
push dword [ebp - 0x64]
call esi
xor ebx, ebx
inc dword [ebp - 0x78]
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x70], 0x278
cmp eax, dword [edi + 0x1d58]
jl 0x40c832
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x74], 0xffffffff
je 0x40c952
push dword [ebp - 0x74]
push dword [ebp - 0x6c]
call dword [sym.imp.PPLIB32W.DLL__SetFileAttributesL_8]
mov dword [edi + 0x3814], ebx
xor eax, eax
mov ecx, dword [ebp + 0x450]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046890b
add ebp, 0x454
leave
ret 8