Function at 0x504f30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x505420
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], 0
mov dword [ebp - 4], 1
mov dword [ebp - 4], 2
mov dword [ebp - 4], 3
mov dword [ebp - 4], 4
mov dword [ebp - 4], 5
mov dword [ebp - 4], 6
mov dword [ebp - 4], 7
mov dword [ebp - 4], 8
mov dword [ebp - 4], 9
mov dword [ebp - 4], 0xa
mov dword [ebp - 4], 0xb
mov dword [ebp - 4], 0xc
mov dword [ebp - 4], 0xd
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x24]
mov dword [eax], 0x7922e0
call fcn.00486560
mov ecx, dword [ebp - 0x24]
call fcn.00505fc0
mov eax, dword [ebp - 0x24]
mov dl, byte [eax + 0xf518e]
test dl, dl
je 0x505016
mov edx, dword [eax + 0xf5198]
test edx, edx
je 0x505008
push esp
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xf5198], 0
xor edx, edx
mov byte [eax + 0xf518e], dl
mov dword [eax + 0xf519c], edx
mov dl, byte [eax + 0xf518d]
test dl, dl
je 0x505091
mov edx, dword [eax + 0xf5198]
test edx, edx
je 0x50507d
add eax, 0xf5190
push edx
push 4
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0x24]
lea ecx, [eax + 0xf519c]
mov edx, dword [eax + 0xf5198]
push edx
push 4
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0xf5198]
push esp
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xf5198], 0
xor edx, edx
mov byte [eax + 0xf518d], dl
mov byte [eax + 0xf518e], dl
mov dword [eax + 0xf519c], edx
mov ecx, dword [eax + 0xf5180]
test ecx, ecx
je 0x5050ad
je 0x5050a6
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x24]
mov byte [eax + 0xf517c], 0
mov ecx, dword [eax + 0xf5170]
test ecx, ecx
je 0x5050cd
je 0x5050c3
push 1
call fcn.004ef580
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xf5170], 0
mov byte [eax + 0xf516e], 0
call fcn.004aac20
call fcn.004aac10
mov eax, dword [0x573f90]
test eax, eax
je 0x50540e
mov edx, dword [ebp - 0x24]
mov al, byte [edx + 0xf50b9]
test al, al
jne 0x5053fe
mov ecx, dword [edx + 0x20]
call fcn.004f1560
push esp
push 0x561b70
call fcn.00425ff0
add esp, 8
mov eax, dword [ebp - 0x24]
call dword [eax + 0xf527c]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0xf5160]
test ecx, ecx
je 0x505133
je 0x505133
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x24]
mov ecx, eax
call fcn.00507160
mov edx, dword [ebp - 0x24]
mov ecx, dword [edx + 0xf5134]
test ecx, ecx
je 0x505152
je 0x505152
mov eax, dword [ecx]
push 1
call dword [eax]
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0xf50d4]
test eax, eax
je 0x50516a
push esp
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov edx, dword [ebp - 0x24]
mov dword [ebp - 4], 0xd
add edx, 0xf52b8
mov ecx, edx
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xc
mov ecx, dword [ebp - 0x24]
add ecx, 0xf52b4
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xb
mov ecx, dword [ebp - 0x24]
add ecx, 0xf52b0
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xa
mov ecx, dword [ebp - 0x24]
add ecx, 0xf52ac
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 9
mov ecx, dword [ebp - 0x24]
add ecx, 0xf51e4
call fcn.004c3660
mov dword [ebp - 4], 8
mov eax, dword [ebp - 0x24]
add eax, 0xf51c4
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0xf
mov edx, dword [ebp - 0x30]
xor eax, eax
mov ecx, dword [edx + 0x14]
mov dword [edx], 0x7923a0
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], eax
mov dword [edx + 8], eax
mov dword [edx + 4], eax
call sub.MFC42.DLL_CPlex::FreeDataChain
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x14], 0
mov dword [ebp - 4], 8
mov dword [eax], 0x779b40
mov dword [ebp - 4], 7
mov ecx, dword [ebp - 0x24]
add ecx, 0xf5184
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0x24]
add ecx, 0xf5174
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x24]
add ecx, 0xf5154
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0x24]
add ecx, 0xf5138
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x24]
add eax, 0xf5090
push sub.MFC42.DLL_CString::CString
push 0xa
push 4
push eax
call fcn.0054bb8e
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0x24]
add ecx, 0xf5088
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x24]
add ecx, 0x130
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x24]
add eax, 0xc4
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0x10
mov ecx, dword [ebp - 0x28]
mov dword [ecx], 0x7922c0
call sub.MFC42.DLL_CMenu::DestroyMenu
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x28]
mov dword [eax], 0x779b40
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x24]
call sub.MFC42.DLL_CWinApp::CWinApp
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edx + 0x20]
call fcn.004f1890
mov edx, dword [ebp - 0x24]
jmp 0x5050fc
mov eax, dword [0x573bf8]
test eax, eax
jne 0x5050eb
jmp 0x50511b