Function at 0x404af0
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408238
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
xor edi, edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
call sub.MFC42.DLL_CString::CString_2
push 0x100
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::GetBufferSetLength
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x1f2c
mov byte [ebp - 4], 2
call sub.MFC42.DLL_operatornew
add esp, 4
mov ebx, eax
lea eax, [ebp + 8]
mov dword [ebp - 0x34], ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call fcn.004072d0
mov ecx, esi
call fcn.00404750
cmp eax, edi
je 0x404eb7
push ecx
lea edx, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x30], esp
push str._prvw.bmp
push edx
push ecx
call sub.MFC42.DLL_operator
mov ecx, esi
call fcn.00404900
cmp ebx, edi
je 0x404eb7
lea eax, [ebp - 0x14]
push str._prvw.jpg
lea ecx, [ebp - 0x30]
push eax
push ecx
call sub.MFC42.DLL_operator
mov edx, dword [eax]
lea eax, [ebp - 0x14]
push str._prvw.bmp
lea ecx, [ebp - 0x2c]
push eax
push ecx
mov byte [ebp - 4], 3
mov dword [ebp - 0x28], edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0x40c06c
push eax
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, edi
mov dword [ebp - 0x18], esi
jne 0x404bf5
mov dword [ebp - 0x1c], edi
jmp 0x404e9f
push edi
push edi
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [ebp - 0x44]
push 0xe
push edx
call edi
push esi
push 1
lea eax, [ebp - 0x70]
push 0x28
push eax
call edi
mov edx, dword [ebp - 0x6c]
add esp, 0x2c
mov eax, edx
and eax, 0x80000007
jns 0x404c2e
dec eax
or eax, 0xfffffff8
inc eax
jne 0x404c34
mov ecx, edx
jmp 0x404c4a
mov ecx, 8
sub ecx, eax
and ecx, 0x80000007
jns 0x404c48
dec ecx
or ecx, 0xfffffff8
inc ecx
add ecx, edx
mov esi, dword [ebp - 0x68]
mov eax, esi
and eax, 0x80000007
jns 0x404c5b
dec eax
or eax, 0xfffffff8
inc eax
jne 0x404c61
mov eax, esi
jmp 0x404c78
mov edi, 8
sub edi, eax
mov eax, edi
and eax, 0x80000007
jns 0x404c76
dec eax
or eax, 0xfffffff8
inc eax
add eax, esi
mov dword [ebp - 0x3c], eax
mov dword [ebx + 0xc], eax
imul eax, ecx
mov word [ebp - 0x38], 0x18
mov dword [ebp - 0x40], ecx
lea eax, [eax + eax*2]
mov dword [ebp - 0x44], esi
push eax
mov dword [ebp - 0x48], edx
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x14], esi
mov dword [ebx + 8], ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov ecx, 5
sub esp, 0x14
lea esi, [ebp - 0x48]
mov edi, esp
mov dword [ebp - 0x20], eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x18]
push eax
push esi
mov ecx, ebx
call fcn.004012d0
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebx + 8]
mov byte [ebx], 0
imul esi, dword [ebx + 0xc]
push esi
mov byte [ebx + 1], 7
call sub.MFC42.DLL_operatornew
add esp, 8
mov edi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x24], eax
push esi
call sub.MFC42.DLL_operatornew
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x18], eax
push eax
push esi
push edi
push ecx
mov ecx, ebx
call fcn.004013a0
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
push 8
push 8
push edx
push eax
push edi
mov ecx, ebx
call fcn.004014c0
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push 8
push 8
push ecx
push edx
push esi
mov ecx, ebx
call fcn.004014c0
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
mov edx, dword [ebp - 0x18]
push 8
push 8
push eax
push ecx
push edx
mov ecx, ebx
call fcn.004014c0
push 0x3c
lea eax, [ebx + 0x101c]
push eax
push 0x4099f8
mov ecx, ebx
call fcn.004015f0
lea ecx, [ebx + 0x105c]
push 0x3c
push ecx
push 0x409a38
mov ecx, ebx
call fcn.004015f0
mov ecx, ebx
call fcn.004016a0
lea edx, [ebx + 0x817]
mov ecx, ebx
mov dword [ebx + 0x1018], edx
call fcn.00402c20
mov eax, dword [ebp - 0x28]
push 0x40c068
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebx + 4], eax
test eax, eax
je 0x404e6f
push eax
push 1
push 2
push 0x409c66
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov ecx, ebx
call fcn.00401760
mov ecx, ebx
call fcn.004017d0
mov ecx, ebx
call fcn.00401850
mov ecx, ebx
call fcn.00401920
mov ecx, ebx
call fcn.00401ae0
lea ecx, [ebx + 0x129c]
push ecx
push 0x409acc
push 0x409ab8
mov ecx, ebx
call fcn.00401b40
lea edx, [ebx + 0x132c]
mov ecx, ebx
push edx
push 0x409b0c
push 0x409af8
call fcn.00401b40
lea eax, [ebx + 0x12e4]
mov ecx, ebx
push eax
push 0x409aec
push 0x409ad8
call fcn.00401b40
lea ecx, [ebx + 0x192c]
push ecx
push 0x409bc4
push 0x409bb0
mov ecx, ebx
call fcn.00401b40
mov edx, dword [ebp - 0x18]
mov ecx, ebx
push edx
push esi
push edi
call fcn.00401bf0
mov eax, dword [ebx + 4]
push eax
push 1
push 2
push 0x409c68
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov edx, dword [ebp - 0x20]
push edx
call sub.MFC42.DLL_operatordelete
push edi
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebp - 0x18]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebx + 4]
add esp, 0x10
xor ecx, ecx
test eax, eax
setne cl
mov dword [ebp - 0x1c], ecx
xor edi, edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea edx, [ebp - 0x14]
push str._prvw.jpg
lea eax, [ebp - 0x30]
push edx
push eax
call sub.MFC42.DLL_operator
mov ecx, dword [ebp + 0xc]
push eax
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
jmp 0x404efc
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8