Function at 0x40a110
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411188
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push esi
mov esi, ecx
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 8]
push 0
push eax
mov ecx, esi
mov dword [esp + 0x4c], 0
call fcn.00409b60
mov ecx, dword [esp + 8]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x40a1b7
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Err:_d_
push 1
call fcn.00409b00
add esp, 0x10
mov ecx, esi
push 0xa
call fcn.00409700
lea ecx, [esp + 8]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040f790
xor eax, eax
pop esi
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret
push ebx
push ebp
push edi
mov dword [esp + 0x1c], 0x1388
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x3c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esi + 0x334]
xor edi, edi
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov ebp, edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x358]
test eax, eax
je 0x40a29c
mov eax, dword [esi + 0x350]
lea edx, [eax + 8]
mov edi, dword [eax + 8]
mov ebp, dword [edx + 4]
mov ebx, dword [edx + 8]
mov ecx, dword [edx + 0xc]
xor edx, edx
mov dword [esp + 0x44], ecx
mov ecx, dword [eax]
cmp ecx, edx
mov dword [esi + 0x350], ecx
je 0x40a224
mov dword [ecx + 4], edx
jmp 0x40a22a
mov dword [esi + 0x354], edx
mov ecx, dword [esi + 0x35c]
mov dword [eax], ecx
mov dword [esi + 0x35c], eax
mov eax, dword [esi + 0x358]
dec eax
mov dword [esi + 0x358], eax
jne 0x40a284
mov eax, dword [esi + 0x350]
cmp eax, edx
je 0x40a257
mov eax, dword [eax]
cmp eax, edx
jne 0x40a251
mov ecx, dword [esi + 0x360]
mov dword [esi + 0x358], edx
mov dword [esi + 0x35c], edx
mov dword [esi + 0x354], edx
mov dword [esi + 0x350], edx
call sub.MFC42.DLL_CPlex::FreeDataChain
mov dword [esi + 0x360], 0
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x2c], ebp
mov ebp, ebx
mov dword [esp + 0x1c], 1
jmp 0x40a2a4
mov dword [esp + 0x1c], 0x1388
mov edx, dword [esi + 0x32c]
lea ecx, [esi + 0x32c]
call dword [edx + 0x1c]
test edi, edi
ja 0x40a2ca
mov al, byte [esi + 0x385]
test al, al
je 0x40a1c2
jmp 0x40a3be
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
and ebx, 0xff
push 0
push 0
push ebp
lea eax, [ebx + ebx*2]
push edx
mov dword [esp + 0x20], 0
lea ecx, [esi + eax*4 + 0x25c]
mov dword [esp + 0x30], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebp
je 0x40a308
mov dword [esp + 0x10], str.ERR:_d_
jmp 0x40a345
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push 0
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a32e
mov dword [esp + 0x10], str.ERR:_d__
jmp 0x40a345
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x40a345
mov dword [esp + 0x10], 0x416f18
mov ecx, dword [esp + 0x2c]
push ecx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x40a38c
mov eax, dword [esp + 0x20]
mov ebp, dword [eax + 4]
mov edx, dword [eax + 8]
add ebp, edi
mov ecx, ebp
mov dword [eax + 4], ebp
cmp ecx, edx
jl 0x40a1c2
push ebx
mov ecx, esi
call fcn.004096b0
mov ecx, esi
call fcn.004097c0
test eax, eax
je 0x40a1c2
jmp 0x40a3be
mov eax, dword [esp + 0x28]
push edi
and eax, 0xff
push ebp
lea edx, [esi + 0x14c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x24]
push eax
push 1
call fcn.00409b00
add esp, 0x1c
mov ecx, esi
push 0xa
call fcn.00409700
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
test eax, eax
je 0x40a3d0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 8]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040f790
mov ecx, dword [esp + 0x3c]
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x44
ret