Function at 0x40e430
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x25c
push ebx
push ebp
push esi
mov ebx, ecx
push edi
push 1
mov ecx, 0x48bae8
mov dword [esp + 0x1c], ebx
call fcn.00408fb0
mov esi, dword [esp + 0x278]
mov edi, dword [esp + 0x274]
push esi
push edi
mov ecx, ebx
call fcn.0040fd40
cmp eax, 0xffffffff
je 0x40eb0e
push esi
push edi
mov ecx, 0x494498
call fcn.0041a900
cmp eax, 1
je 0x40eb0e
lea eax, [esp + 0x10]
mov ecx, 0x469a40
push eax
call fcn.00420d40
mov ebp, dword [eax]
cmp edi, ebp
mov ebx, dword [eax + 4]
jle 0x40e4cf
cmp esi, ebx
jle 0x40e4cf
mov ecx, dword [0x48f138]
push 0
add ecx, 0x2df8
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetWidth_unsigned_int_
add eax, ebp
cmp edi, eax
jae 0x40e4cf
mov edx, dword [0x48f138]
push 0
lea ecx, [edx + 0x2df8]
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetHeight_unsigned_int_
add eax, ebx
cmp esi, eax
jb 0x40e4f9
cmp edi, 0x1b8
jle 0x40e4ef
cmp esi, 0x171
jle 0x40e4ef
cmp edi, 0x20f
jge 0x40e4ef
cmp esi, 0x19a
jl 0x40e4f9
mov dword [0x469a80], 0
mov ebp, dword [esp + 0x18]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40e50a
mov eax, dword [ecx]
push esi
push edi
call dword [eax]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40e525
mov edx, dword [ecx]
push esi
push edi
call dword [edx + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40e537
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40e539
xor eax, eax
mov eax, dword [eax + 0x20]
mov ebx, dword [sym.imp.USER32.dll_PostMessageA]
push 0
push 0
push 0x7f2
push eax
call ebx
cmp dword [ebp + 0x1c], 0x2b96
jne 0x40e573
cmp dword [0x469a80], 1
jne 0x40e573
mov ecx, dword [0x469a90]
neg ecx
sbb ecx, ecx
add ecx, 2
mov dword [0x469a84], ecx
lea edx, [esp + 0x1c]
mov ecx, 0x469a40
push edx
call fcn.00420d40
mov eax, dword [0x469a80]
test eax, eax
je 0x40e5d0
cmp edi, dword [esp + 0x1c]
jl 0x40e5d0
mov eax, dword [0x48f138]
push 0
lea ecx, [eax + 0x2df8]
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetWidth_unsigned_int_
add eax, dword [esp + 0x1c]
cmp edi, eax
jae 0x40e5d0
cmp esi, dword [esp + 0x20]
jl 0x40e5d0
mov ecx, dword [0x48f138]
push 0
add ecx, 0x2df8
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetHeight_unsigned_int_
add eax, dword [esp + 0x20]
cmp esi, eax
jb 0x40e75e
push esi
lea edx, [esp + 0x14]
push edi
push edx
mov ecx, 0x494648
call fcn.00408760
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x40e6e1
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x40e75e
cmp eax, 4
jge 0x40e75e
cmp eax, 3
ja case.default.0x40e608
jmp dword [eax*4 + 0x40eb1c]
mov esi, 0xe6
mov edi, 0xc9
jmp 0x40e647
mov esi, 0x131
mov edi, 0x9b
jmp 0x40e647
mov esi, 0xb2
mov edi, 0xb4
jmp 0x40e647
mov esi, 0x131
mov edi, 0xb4
jmp 0x40e647
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x10]
mov ecx, 0x48bb38
call fcn.00417190
test eax, eax
je 0x40e687
push edi
push esi
mov ecx, 0x469a40
call fcn.00420d60
mov eax, dword [0x469a80]
test eax, eax
jne 0x40eb0e
push 1
mov ecx, 0x469a40
call fcn.00420400
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
mov eax, dword [0x493abc]
test eax, eax
je 0x40eb0e
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40e6a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
test eax, eax
jne 0x40e6ac
xor eax, eax
jmp 0x40e6af
mov eax, dword [eax + 0x20]
push 0
push 0
push eax
push 1
push 0
push 0
push 0x4665a4
push 0
push 0x4668cc
push 0x466a80
call dword [0x493abc]
add esp, 0x28
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
cmp eax, 0x64
jne 0x40e75e
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
lea eax, [esp + 0x28]
push str.qqgame:__selfsetting:1
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov eax, dword [0x48f12c]
add esp, 0xc
test eax, eax
je 0x40eb0e
mov ecx, 0x48bb38
call fcn.00417190
test eax, eax
je 0x40eb0e
lea ecx, [esp + 0x24]
lea edi, [esp + 0x24]
push ecx
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x48f12c]
repne scasb al, byte es:[edi]
mov esi, dword [edx]
not ecx
push ecx
push 0x55
mov ecx, edx
call dword [esi + 0x70]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
mov edx, dword [0x48bac0]
mov eax, 1
xor ecx, ecx
cmp edx, eax
mov dword [esp + 0x10], ecx
jne 0x40e77d
mov dword [0x48bac0], ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
sub eax, ecx
je 0x40e902
dec eax
je 0x40e8a4
dec eax
jne 0x40eb0e
mov eax, dword [0x48f138]
mov edx, dword [ebp + 0x1c]
push edx
lea ecx, [eax + 0x34]
call fcn.00403870
cmp eax, 3
je 0x40eb0e
mov ecx, dword [ebp + 0x1c]
mov edx, dword [0x48f138]
push ecx
lea ecx, [edx + 0x34]
call fcn.00403870
cmp eax, 4
je 0x40eb0e
mov eax, dword [ebp + 0x1c]
cmp eax, 0x2b94
jg 0x40e84c
cmp eax, 0x2b89
jge 0x40e82f
cmp eax, 3
jl 0x40eb0e
cmp eax, 0x17
jg 0x40eb0e
push 2
push eax
mov eax, dword [0x48f138]
lea ecx, [eax + 0x34]
call fcn.00403df0
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40e810
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40e812
xor eax, eax
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call sub.MFC42.DLL_CWnd::FromHandle
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
add eax, 0xffffd477
mov ecx, 0x469a40
push eax
call fcn.00420200
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
cmp eax, 0x2b98
jne 0x40eb0e
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov ecx, dword [0x48f12c]
mov dword [esp + 0x64], eax
test ecx, ecx
mov dword [esp + 0x68], 4
mov dword [esp + 0x6c], 0x493e0
je 0x40eb0e
mov edx, dword [ecx]
lea eax, [esp + 0x64]
push eax
push 0x208
push 0x53
call dword [edx + 0x70]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
mov eax, dword [ebp + 0x1c]
sub eax, 2
jne 0x40eb0e
mov edx, dword [0x48f138]
cmp dword [edx + 0x30b4], ecx
jne 0x40eb0e
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40e8d4
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40e8d6
xor eax, eax
mov eax, dword [eax + 0x20]
and esi, 0xffff
shl esi, 0x10
and edi, 0xffff
or esi, edi
push esi
push 2
push 0xa1
push eax
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
mov eax, dword [ebp + 0x1c]
cmp eax, 0x258
jl 0x40ea67
cmp eax, 0x25a
jg 0x40ea67
mov ecx, dword [0x48ec14]
test ecx, ecx
jle 0x40ea67
mov ecx, dword [0x48f138]
mov edx, dword [ecx + eax*4 + 0x28b8]
test edx, edx
jne 0x40ea67
mov ebp, dword [0x48f130]
mov eax, dword [ebp + 8]
test eax, eax
jne 0x40ea2c
mov eax, dword [ebp + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test eax, eax
jne 0x40e9f4
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 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 edx, [esp + 0x64]
push 0x104
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x64]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x40e9a6
mov byte [eax + 1], 0
mov edi, str...LogicAvMgrGm.dll
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x64]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x64]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp + 4], eax
jne 0x40e9f4
push str.ERROR:_Load_advertisement_manager_for_game_DLL_fail._Path:
call ebx
lea ecx, [esp + 0x64]
push ecx
call ebx
mov eax, dword [ebp + 4]
test eax, eax
je 0x40ea2c
push str.CreateObject
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40ea25
push 0x1f001
call eax
add esp, 4
test eax, eax
je 0x40ea1e
mov dword [ebp + 8], eax
jmp 0x40ea2c
push str.ERROR:_Cannt_create_Advertisement_Manager_Object._n
jmp 0x40ea2a
push str.ERROR:_Cannt_find_CreateObject___in_Advertisement_Manager_DLL._n
call ebx
mov ebp, dword [ebp + 8]
test ebp, ebp
je 0x40ea67
mov ecx, 0x48bb38
call fcn.00416d40
cmp eax, 1
jne 0x40ea50
mov ecx, 0x48bb38
call fcn.00417190
test eax, eax
jne 0x40ea67
mov edx, dword [ebp]
push 0
push 0
push 0
push 3
push 0x35
push str.DDP_PlayInfo
mov ecx, ebp
call dword [edx + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x1c]
cmp eax, 0xa
jl 0x40ea9f
cmp eax, 0x4a
jge 0x40ea9f
add eax, 0xfffffff6
mov ecx, eax
and ecx, 0x80000007
jns 0x40ea8a
dec ecx
or ecx, 0xfffffff8
inc ecx
cdq
and edx, 7
push ecx
add eax, edx
mov ecx, 0x48bae8
sar eax, 3
push eax
call fcn.00408e50
mov eax, dword [esi + 0x1c]
cmp eax, 0x1f4
jg 0x40eaf5
je 0x40ead6
cmp eax, 0xc8
jl 0x40eb0e
cmp eax, 0xca
jg 0x40eb0e
add eax, 0xffffff38
mov ecx, 0x48baac
push eax
call fcn.004195b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc
mov eax, dword [0x48babc]
xor edx, edx
test eax, eax
pop edi
pop esi
sete dl
pop ebp
mov dword [0x48babc], edx
pop ebx
add esp, 0x25c
ret 0xc
cmp eax, 0x1f5
jne 0x40eb0e
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40eb0e
mov dword [0x48bac0], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x25c
ret 0xc