Function at 0x40d990
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Link many functions at runtime
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41ca58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.0040df60
push 0x4247e8
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
push 0x4232c8
lea ecx, [esp + 0x20]
mov dword [esp + 0x14c], 0
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x148], 1
call sub.MFC42.DLL_CFileFind::CFileFind
lea eax, [esp + 0x10]
mov byte [esp + 0x148], 2
push eax
call fcn.00403720
add esp, 4
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push ecx
push edx
push eax
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x150], 3
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 2
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40dc74
lea ecx, [esp + 0x40]
push ecx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40dc49
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x3f], 0x5c
jne 0x40da89
lea edx, [esp + 0x40]
lea eax, [esp + 0x10]
push edx
push str._smplayer_
push eax
jmp 0x40da98
lea ecx, [esp + 0x40]
lea edx, [esp + 0x10]
push ecx
push 0x4240c4
push edx
call sub.MFC42.DLL_CString::Format_1
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
call fcn.00401e50
add esp, 4
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
mov byte [esp + 0x1b], 0
push str.replace.opt
push ecx
push edx
call sub.MFC42.DLL_operator_2
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x150], 4
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 2
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40dafd
mov byte [esp + 0x1b], 1
jmp 0x40db56
mov ecx, dword [esp + 0x150]
lea eax, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x150], 5
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 2
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x40dc74
call sub.MFC42.DLL_AfxGetModuleState
mov esi, dword [eax + 8]
push 0x4240bc
push 0x85
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x40dc33
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40dbc5
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
push 0x423118
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
lea ecx, [esp + 0x14]
mov esi, eax
call sub.MFC42.DLL_CString::CString
test esi, esi
jne 0x40dbee
lea ecx, [esp + 0x40]
push 0x100
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40dc74
lea edx, [esp + 0x40]
lea eax, [esp + 0x10]
push edx
push 0x4240b8
push eax
jmp 0x40dc6c
push esi
push ebx
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov al, byte [esp + 0x2f]
add esp, 0x14
cmp al, 1
jne 0x40dc74
lea ecx, [esp + 0x10]
push str.replace.opt
lea edx, [esp + 0x18]
push ecx
push edx
call sub.MFC42.DLL_operator_2
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
jmp 0x40dc74
lea eax, [esp + 0x40]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40dc74
jmp 0x40dc5d
lea eax, [esp + 0x40]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x40dc74
lea ecx, [esp + 0x40]
lea edx, [esp + 0x10]
push ecx
push 0x4240b8
push edx
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFileFind::Close
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea ecx, [esp + 0x14]
mov dword [0x4248d4], eax
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x4248d4]
test eax, eax
jne 0x40dd2d
lea ecx, [esp + 0x14]
call fcn.0041b5bc
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x10]
push eax
lea edx, [esp + 0x24]
mov bl, 6
push ecx
push edx
mov byte [esp + 0x154], bl
call sub.MFC42.DLL_operator_3
mov eax, dword [eax]
lea ecx, [esp + 0x14]
push eax
push 0x42405c
push ecx
mov byte [esp + 0x154], 7
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea ecx, [esp + 0x20]
mov byte [esp + 0x148], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x14]
push 0x40
push 0x42311c
push edx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 2
call sub.MFC42.DLL_CString::CString
jmp 0x40df00
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x42404c
push eax
call esi
mov dword [0x4248d0], eax
mov eax, dword [0x4248d4]
push 0x424040
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x424030
push ecx
mov dword [0x4248cc], eax
call esi
mov edx, dword [0x4248d4]
push 0x424020
push edx
mov dword [0x4248c8], eax
call esi
mov dword [0x4248c4], eax
mov eax, dword [0x4248d4]
push 0x424010
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x424004
push ecx
mov dword [0x4248c0], eax
call esi
mov edx, dword [0x4248d4]
push 0x423ff0
push edx
mov dword [0x4248bc], eax
call esi
mov dword [0x4248b8], eax
mov eax, dword [0x4248d4]
push 0x423fe0
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423fd4
push ecx
mov dword [0x4248b4], eax
call esi
mov edx, dword [0x4248d4]
push 0x423fc8
push edx
mov dword [0x4248b0], eax
call esi
mov dword [0x4248ac], eax
mov eax, dword [0x4248d4]
push 0x423fc0
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423fb8
push ecx
mov dword [0x4248a8], eax
call esi
mov edx, dword [0x4248d4]
push 0x423fb0
push edx
mov dword [0x4248a4], eax
call esi
mov dword [0x4248a0], eax
mov eax, dword [0x4248d4]
push 0x423fa8
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423f98
push ecx
mov dword [0x42489c], eax
call esi
mov edx, dword [0x4248d4]
push 0x423f88
push edx
mov dword [0x424898], eax
call esi
mov dword [0x424894], eax
push 0x423f80
mov eax, dword [0x4248d4]
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423f74
push ecx
mov dword [0x424890], eax
call esi
mov edx, dword [0x4248d4]
push 0x423f68
push edx
mov dword [0x42488c], eax
call esi
mov dword [0x424888], eax
mov eax, dword [0x4248d4]
push 0x423f58
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423f4c
push ecx
mov dword [0x424884], eax
call esi
mov edx, dword [0x4248d4]
push 0x423f3c
push edx
mov dword [0x424880], eax
call esi
mov dword [0x42487c], eax
mov eax, dword [0x4248d4]
push 0x423f2c
push eax
call esi
mov ecx, dword [0x4248d4]
push 0x423f18
push ecx
mov dword [0x424878], eax
call esi
mov edx, dword [0x4248d4]
push 0x423f08
push edx
mov dword [0x424874], eax
call esi
mov dword [0x424870], eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x148], 1
call fcn.0041b74e
lea ecx, [esp + 0x1c]
mov byte [esp + 0x148], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x148], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x140]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x13c
ret 4