Function at 0x410260
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x453492
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x168
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov ebx, dword [esp + 0x190]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 8
push ebx
call edi
push sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString_1
push 8
lea eax, [esp + 0x60]
push 4
push eax
call fcn.00432b4a
lea ecx, [esp + 0x10]
mov dword [esp + 0x180], ebp
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x20]
mov byte [esp + 0x180], 1
call sub.MFC42.DLL_CStdioFile::CStdioFile
mov byte [esp + 0x180], 2
xor esi, esi
push esi
push ebx
lea ecx, [esp + 0x18]
push str._sDDP_BrandBack_d.tga
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x20]
add esp, 0x10
push edx
call edi
mov eax, dword [esp + 0x10]
push ebp
push ebp
push eax
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x410323
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CStdioFile::Close
inc esi
cmp esi, 0x64
jl 0x4102e5
push ebx
lea ecx, [esp + 0x14]
push str._sDDP_BrandBack.ini
push ecx
mov dword [esp + 0x28], esi
mov dword [0x48ec10], esi
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x20]
push ebp
push ebp
push edx
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x410369
xor edi, edi
mov dword [esp + 0x1c], ebp
mov dword [0x48ec10], ebp
mov dword [esp + 0x18], edi
jmp 0x410456
push 0x48f23c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
mov byte [esp + 0x184], 3
call sub.MFC42.DLL_CStdioFile::ReadString
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x34]
push ecx
push 0x466120
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x14]
push 0x48f23c
call sub.MFC42.DLL_CString::operator_1
mov al, byte [esp + 0x34]
mov byte [esp + 0x51], 0
test al, al
je 0x41040d
mov al, byte [esp + ebp + 0x34]
cmp al, 0x39
jg 0x4103ff
cmp al, 0x30
jl 0x4103ff
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x184], 4
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x18]
mov byte [esp + 0x180], 3
call sub.MFC42.DLL_CString::CString
inc ebp
cmp ebp, 0x1d
je 0x41040d
mov al, byte [esp + ebp + 0x34]
test al, al
jne 0x4103c0
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CStdioFile::Close
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x410432
mov dword [esp + 0x18], esi
mov eax, esi
cmp eax, 7
jg 0x41043b
cmp eax, esi
jle 0x41043f
mov dword [esp + 0x18], esi
lea ecx, [esp + 0x14]
mov byte [esp + 0x180], 2
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x18]
xor ebp, ebp
xor esi, esi
call dword [sym.imp.MSVCRT.dll_rand]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0x4104bd
xor edi, edi
push ebp
push ebx
lea eax, [esp + 0x18]
push str._sDDP_BrandBack_d.tga
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x20]
mov edx, dword [0x48f138]
add esp, 0x10
push 0
push 0
push 0
push ecx
lea ecx, [edi + edx + 0x2c24]
call sym.twinrpg.exe_public:_bool___thiscall_CxImage::CreateImageFromFile_char_const___struct_IDisplay::_SELECT_PARA___unsigned_int__unsigned_long_int__
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x1c]
inc esi
add edi, 0x24
cmp esi, eax
je 0x4104b9
inc ebp
cmp ebp, eax
jl 0x41046c
mov edi, dword [esp + 0x18]
test edi, edi
jle 0x410551
push str.change_two_image
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor ebp, ebp
cmp edi, esi
je 0x4104f2
mov ecx, dword [esp + 0x14]
sub esi, edi
mov eax, ecx
cdq
idiv esi
and ecx, reloc.MagicShow.dll_Ordinal_1
mov ebp, edx
jns 0x4104f0
dec ecx
or ecx, 0xfffffffe
inc ecx
add ebp, ecx
xor edi, edi
xor esi, esi
lea ecx, [edi + ebp]
lea edx, [esp + 0x10]
push ecx
push ebx
push str._sDDP_BrandBack_d.tga
push edx
call sub.MFC42.DLL_CString::Format
mov ecx, dword [0x48f138]
mov eax, dword [esp + 0x20]
add esp, 0x10
lea ecx, [esi + ecx + 0xb3c]
push 0
push 0
push 0
push eax
call sym.twinrpg.exe_public:_bool___thiscall_CxImage::CreateImageFromFile_char_const___struct_IDisplay::_SELECT_PARA___unsigned_int__unsigned_long_int__
mov ecx, dword [0x48f138]
mov edx, dword [esp + 0x10]
push 0
push 0
sub ecx, esi
push 0
push edx
add ecx, 0xaf4
call sym.twinrpg.exe_public:_bool___thiscall_CxImage::CreateImageFromFile_char_const___struct_IDisplay::_SELECT_PARA___unsigned_int__unsigned_long_int__
add esi, 0x24
inc edi
cmp esi, 0x48
jl 0x4104f6
mov ebx, dword [0x48f130]
mov eax, dword [ebx + 8]
test eax, eax
jne 0x410643
mov eax, dword [ebx + 4]
test eax, eax
jne 0x410607
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x75]
mov byte [esp + 0x74], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea ecx, [esp + 0x74]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x74]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x4105b3
mov byte [eax + 1], 0
mov edi, str...LogicAvMgrGm.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x74]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x74]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebx + 4], eax
jne 0x410607
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.ERROR:_Load_advertisement_manager_for_game_DLL_fail._Path:
call esi
lea ecx, [esp + 0x74]
push ecx
call esi
mov eax, dword [ebx + 4]
test eax, eax
je 0x410643
push str.CreateObject
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x410638
push 0x1f001
call eax
add esp, 4
test eax, eax
je 0x410631
mov dword [ebx + 8], eax
jmp 0x410643
push str.ERROR:_Cannt_create_Advertisement_Manager_Object._n
jmp 0x41063d
push str.ERROR:_Cannt_find_CreateObject___in_Advertisement_Manager_DLL._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, dword [ebx + 8]
mov ecx, 0x48bb38
call fcn.00416d40
cmp eax, 1
jne 0x41068b
test ebx, ebx
je 0x41068b
mov eax, dword [0x48ec10]
test eax, eax
jle 0x41068b
mov eax, dword [0x48ed28]
test eax, eax
jne 0x41068b
push 0
push 0
push 0
mov dword [0x48ed28], 1
mov edx, dword [ebx]
push 1
push 0x34
push str.DDP_BrandBack
mov ecx, ebx
call dword [edx + 0x14]
lea ecx, [esp + 0x20]
mov byte [esp + 0x180], 1
call fcn.004328ec
lea ecx, [esp + 0x10]
mov byte [esp + 0x180], 0
call sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString
push 8
lea eax, [esp + 0x5c]
push 4
push eax
mov dword [esp + 0x190], 0xffffffff
call fcn.00432bcc
mov ecx, dword [esp + 0x178]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x174
ret 4