Function at 0x40fec0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41cc52
push eax
mov eax, 0x19048
mov dword fs:[0], esp
call fcn.0041ba30
push esi
push edi
mov edi, ecx
push 0x4247e8
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], edi
mov dword [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [edi + 0x594]
mov dword [esp + 0x19058], 1
test eax, eax
je 0x41021e
push ebx
push ebp
lea ecx, [esp + 0x10]
call fcn.0041b5bc
mov eax, dword [edi + 0x594]
mov byte [esp + 0x19060], 2
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
add ecx, 0xc
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::TrimRight
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push 0x4247e8
push edx
call esi
add esp, 8
test eax, eax
je 0x4101ef
lea eax, [esp + 0x34]
push 1
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
push 0x4231d4
push eax
mov byte [esp + 0x19068], 3
call esi
add esp, 8
test eax, eax
je 0x40ffc2
lea ecx, [esp + 0x2c]
push 1
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
push 0x4231cc
push eax
call esi
add esp, 8
lea ecx, [esp + 0x2c]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40ffc4
mov bl, 1
lea ecx, [esp + 0x34]
mov byte [esp + 0x19060], 2
call sub.MFC42.DLL_CString::CString
test bl, bl
push 0x4247e8
je 0x410099
mov edx, dword [esp + 0x18]
push edx
call esi
add esp, 8
test eax, eax
jne 0x410037
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x20]
mov eax, dword [eax - 8]
dec eax
push eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x19064], 4
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x20]
mov byte [esp + 0x19060], 2
call sub.MFC42.DLL_CString::CString
push 0x5c
push 0x2f
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Replace
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
mov eax, dword [edx - 8]
dec eax
push eax
lea eax, [esp + 0x28]
push eax
call sub.MFC42.DLL_CString::Right
lea ecx, [edi + 0x5a4]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
mov byte [esp + 0x1906c], 5
call sub.MFC42.DLL_operator_3
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x19064], 6
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x38]
mov byte [esp + 0x19060], 5
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0x19060], 2
lea ecx, [esp + 0x24]
jmp 0x4100f6
mov eax, dword [esp + 0x18]
push eax
call esi
add esp, 8
test eax, eax
jne 0x4100c2
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
push 0x5c
push 0x2f
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Replace
lea edx, [esp + 0x10]
lea eax, [edi + 0x5a4]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
call sub.MFC42.DLL_operator_3
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x19064], 7
call sub.MFC42.DLL_CString::operator
mov byte [esp + 0x19060], 2
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
push 0x5c
push 0x2f
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Replace
mov edx, dword [esp + 0x10]
push edx
call fcn.00401e50
add esp, 4
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFileFind::CFileFind
mov eax, dword [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x19068], 8
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
jne 0x4101de
mov ecx, dword [esp + 0x10]
push 0x423118
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4101de
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x200]
push 0
mov dl, byte [eax]
mov esi, dword [eax + 4]
mov eax, dword [eax + 8]
and edx, 0x7f
push eax
push ecx
sub esi, edx
call fcn.00401040
add esp, 0xc
test esi, esi
jbe 0x4101d4
mov edx, dword [edi + 0x200]
lea eax, [esp + 0x58]
push edx
push 0x19000
push 1
push eax
call fcn.00401000
add esp, 0x10
mov edi, eax
cmp edi, esi
push ebp
ja 0x4101bf
push edi
lea ecx, [esp + 0x60]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
sub esi, edi
mov edi, dword [esp + 0x1c]
je 0x4101d4
jmp 0x410182
push esi
lea edx, [esp + 0x60]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edi, dword [esp + 0x2c]
add esp, 0x10
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x3c]
mov byte [esp + 0x19060], 2
call fcn.0041b74e
mov eax, dword [esp + 0x18]
mov ecx, dword [edi + 0x594]
mov eax, dword [eax + 0x10c]
cmp eax, ecx
mov dword [esp + 0x18], eax
jne 0x40ff33
lea ecx, [esp + 0x10]
mov byte [esp + 0x19060], 1
call sub.MFC42.DLL_CString::CString
pop ebp
pop ebx
mov esi, dword [esp + 0x19060]
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
mov dword [esp + 0x28], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x19058], 0
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x19050]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x19054
ret 4