Function at 0x402b20
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x414afc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
mov eax, dword [0x41c260]
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
mov dword [esp + 0x138], eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
add esi, 8
xor edi, edi
cmp eax, edi
jne 0x402b72
mov dword [esp + 0x14], edi
jmp 0x402b8c
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x14], eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0xc]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x148], edi
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetBuffer]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
lea ecx, [esp + 0xc]
je 0x402e89
push 0xffffffffffffffff
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::ReleaseBuffer]
mov eax, dword [str.EDWATCH.Tmp]
push eax
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
cmp dword [esp + 0x14], edi
lea ecx, [esp + 0xc]
jne 0x402c0e
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0xc]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov eax, 1
jmp 0x402e91
push edi
push 0x80
push 2
push edi
push 1
push 0xc0000000
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x1c], edi
je 0x402e85
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 4
lea edx, [esp + 0x2c]
push edx
push edi
mov dword [esp + 0x34], 2
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x402e73
mov dword [esp + 0x10], ebx
mov edi, dword [esi + 4]
test edi, edi
je 0x402eb2
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + edi + 4]
test ecx, ecx
je 0x402cde
test edi, edi
je 0x402eb2
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + edi + 8]
test eax, eax
je 0x402e57
mov edi, dword [esi + 4]
test edi, edi
je 0x402eb2
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x1c]
push edx
push 0x28
add eax, edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x402eb2
mov edx, dword [esi + 8]
sub edx, ecx
mov eax, 0x66666667
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov edi, dword [esp + 0x10]
mov edx, dword [edi + ecx]
push 0x104
push edx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.MSVCR71.dll__mbsnbcpy]
mov ecx, dword [esi + 4]
add esp, 0xc
test ecx, ecx
je 0x402eb2
mov edx, dword [esi + 8]
sub edx, ecx
mov eax, 0x66666667
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov eax, dword [edi + ecx]
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x1c]
push edx
push 0x104
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov edi, dword [esi + 4]
test edi, edi
je 0x402eb2
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov edx, dword [esp + 0x10]
mov eax, dword [edx + edi + 0x18]
test eax, eax
je 0x402e3b
test edi, edi
je 0x402eb2
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x402eb2
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + edi + 0x18]
push 0x104
push ecx
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.MSVCR71.dll__mbsnbcpy]
add esp, 0xc
mov edx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x104
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
inc ebx
add ecx, 0x28
cmp ebx, eax
mov dword [esp + 0x10], ecx
jl 0x402c73
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0xc]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
mov ecx, dword [esp + 0x13c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x134]
call fcn.004140fd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
jmp fcn.00402560