Function at 0x40f2d0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a37a2
push eax
mov eax, 0x5470
mov dword fs:[0], esp
call fcn.004a17e0
mov eax, dword [0x4cbba0]
xor eax, esp
mov dword [esp + 0x546c], eax
lea ecx, [esp + 0x5480]
mov dword [esp + 0x5478], 1
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::IsEmpty]
test al, al
lea ecx, [esp + 0x5480]
je 0x40f33a
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x5484]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
jmp 0x40f5e8
push ebx
push ebp
push edi
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call fcn.0049ec49
mov ebp, eax
xor eax, eax
xor ebx, ebx
add esp, 4
cmp ebp, ebx
mov ecx, 0x41
lea edi, [esp + 0x270]
rep stosd dword es:[edi], eax
je 0x40f380
lea ecx, [esp + 0x5490]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea eax, [esp + 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [esp + 0x270], bl
je 0x40f3be
lea ecx, [esp + 0x270]
push ecx
call fcn.004091d0
add esp, 4
test eax, eax
jne 0x40f3be
lea ecx, [esp + 0x548c]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x5490]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
jmp 0x40f5e5
lea edx, [esp + 0x10]
push edx
push ebp
call fcn.0049e212
add esp, 8
test eax, eax
jne 0x40f3d6
cmp dword [esp + 0x10], ebx
je 0x40f39d
push ebp
call fcn.0049e593
add esp, 4
test eax, eax
jne 0x40f39d
push esi
jmp 0x40f3f0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x170]
rep stosd dword es:[edi], eax
push 0xff
mov ecx, 0x14
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x37c]
push eax
push ebx
push ebx
push 0x104
lea ecx, [esp + 0x184]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
mov dword [esp + 0x398], ebx
call fcn.0049e56c
add esp, 0x20
test eax, eax
jne 0x40f60b
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esp + 0x170]
push eax
call esi
lea ecx, [esp + 0x170]
mov al, byte [eax + ecx - 1]
dec ecx
cmp al, 0x5c
je 0x40f5ab
cmp al, 0x2f
je 0x40f5ab
lea edx, [esp + 0x274]
push edx
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x6c]
push ecx
call esi
lea edx, [esp + 0x6c]
mov cl, byte [eax + edx - 1]
dec edx
cmp cl, 0x5c
je 0x40f4a8
push 0x4ad6f0
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x170]
push ecx
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.MSVCR71.dll__strdup]
mov esi, eax
push 0x5c
push esi
call dword [sym.imp.MSVCR71.dll_strrchr]
add esp, 0xc
xor edi, edi
cmp eax, ebx
je 0x40f4e7
push esi
mov byte [eax], bl
call fcn.004091d0
add esp, 4
mov edi, eax
push esi
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
cmp edi, ebx
je 0x40f60b
lea ecx, [esp + 0x6c]
push ecx
call fcn.00409260
add esp, 4
test eax, eax
je 0x40f60b
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40f60b
push ebp
call fcn.0049eef6
add esp, 4
test eax, eax
jne 0x40f60b
jmp 0x40f550
push 0x5000
lea eax, [esp + 0x480]
push eax
push ebp
call fcn.0049e824
mov esi, eax
add esp, 0xc
cmp esi, ebx
jle 0x40f593
push ebx
lea ecx, [esp + 0x14]
push ecx
push esi
lea edx, [esp + 0x488]
push edx
push edi
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f590
cmp dword [esp + 0x10], esi
je 0x40f550
or esi, 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.0049ea1c
add esp, 4
test eax, eax
jne 0x40f60b
cmp esi, ebx
jl 0x40f60b
push ebp
call fcn.0049e5d5
add esp, 4
test eax, eax
je 0x40f3f0
push ebp
call fcn.0049ec57
add esp, 4
lea ecx, [esp + 0x5490]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x5494]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov eax, 1
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x5470]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x546c]
xor ecx, esp
call fcn.004a17d1
add esp, 0x547c
ret
lea ecx, [esp + 0x5490]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x5494]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
jmp 0x40f5e4