Function at 0x404f08
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x406ea4
call fcn.00406cf0
sub esp, 0x1c
mov eax, dword [esp + 0x30]
push ebx
push ebp
push esi
push edi
call fcn.00403e9d
lea ecx, [esp + 0x24]
mov dword [esp + 0x28], eax
call fcn.0040645c
and dword [esp + 0x34], 0
lea ecx, [esp + 0x20]
call fcn.0040645c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 1
call fcn.0040645c
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 2
call fcn.0040645c
push 0x82c6
lea ecx, [esp + 0x28]
mov byte [esp + 0x38], 3
call sub.MFC42u.dll_CString::LoadStringW
push 0x82c7
lea ecx, [esp + 0x24]
call sub.MFC42u.dll_CString::LoadStringW
push 0x82c8
lea ecx, [esp + 0x20]
call sub.MFC42u.dll_CString::LoadStringW
push 0x82c9
lea ecx, [esp + 0x1c]
call sub.MFC42u.dll_CString::LoadStringW
push dword [esp + 0x18]
mov esi, 0x408480
push dword [esp + 0x20]
push dword [esp + 0x28]
push dword [esp + 0x30]
push 0x402670
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
mov edi, 0x408b30
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x28
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404fd8
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call ebp
mov ebx, dword [sym.imp.msvcrt.dll_wcscpy]
push 0x402298
push esi
call ebx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405020
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call ebp
and dword [esp + 0x10], 0
cmp dword [esp + 0x28], 0
jle 0x4051d4
mov ebp, 0x408380
push 0x402380
push ebp
call ebx
pop ecx
pop ecx
mov ecx, dword [esp + 0x40]
push 0x80
push ebp
push 0
push dword [esp + 0x1c]
call sub.MFC42u.dll_CListCtrl::GetItemText
push ebp
push esi
call ebx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40508c
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x402380
push ebp
call ebx
pop ecx
pop ecx
mov ecx, dword [esp + 0x40]
push 0x80
push ebp
push 1
push dword [esp + 0x1c]
call sub.MFC42u.dll_CListCtrl::GetItemText
push ebp
push esi
call ebx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4050e7
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x402380
push ebp
call ebx
pop ecx
pop ecx
mov ecx, dword [esp + 0x40]
push 0x80
push ebp
push 2
push dword [esp + 0x1c]
call sub.MFC42u.dll_CListCtrl::GetItemText
push ebp
push esi
call ebx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405142
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x402380
push ebp
call ebx
pop ecx
pop ecx
mov ecx, dword [esp + 0x40]
push 0x80
push ebp
push 3
push dword [esp + 0x1c]
call sub.MFC42u.dll_CListCtrl::GetItemText
push ebp
push 0x402288
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
push eax
push esi
push edi
call dword [sym.imp.msvcrt.dll_wcstombs]
mov eax, edi
add esp, 0x1c
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4051a6
push 0
sub eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x28]
jl 0x40504d
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 2
call sub.MFC42u.dll_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], 1
call sub.MFC42u.dll_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x34], 0
call sub.MFC42u.dll_CString::CString
or dword [esp + 0x34], 0xffffffff
lea ecx, [esp + 0x24]
call sub.MFC42u.dll_CString::CString
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
xor eax, eax
pop ebp
inc eax
pop ebx
mov dword fs:[0], ecx
leave
ret 8