Function at 0x40c340
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x453293
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x104
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x4939e0
mov dword [esp + 0x10], edi
call fcn.00424680
mov eax, dword [edi + 0x324c]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov esi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
push ebx
mov dword [esp + 0x54], ebx
call esi
mov ecx, dword [edi + 0x30b8]
mov dword [esp + 0x28], eax
call fcn.0042f9d0
mov ecx, dword [esp + 0x28]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x48], eax
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
mov eax, 0x180
push ebx
mov dword [esp + 0x78], 0x28
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov word [esp + 0x84], 1
mov word [esp + 0x86], 0x18
call esi
push 0
lea edx, [esp + 0x74]
mov esi, eax
push 0
push edx
lea eax, [esp + 0x80]
push 0
push eax
push ebx
mov dword [esp + 0x74], esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x54], eax
mov dword [esp + 0x18], 2
fild dword [esp + 0x18]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], ecx
fmul qword [0x458338]
fstp qword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x20]
xor eax, eax
mov al, byte [ecx]
mov esi, eax
dec esi
js 0x40c5ff
fld qword [esp + 0x2c]
fadd qword [0x458320]
fmul qword [0x458318]
fild dword [esp + 0x1c]
fld st(0)
fadd st(2)
call sub.MSVCRT.dll__ftol
fild dword [esp + 0x14]
mov edi, eax
fstp qword [esp + 0x3c]
fld qword [0x458320]
fsub qword [esp + 0x2c]
fmul qword [0x458318]
fstp qword [esp + 0x34]
fadd qword [esp + 0x34]
call sub.MSVCRT.dll__ftol
fld qword [esp + 0x3c]
fadd st(1)
mov ebx, eax
push edi
call sub.MSVCRT.dll__ftol
fstp st(0)
fld qword [esp + 0x40]
fadd qword [esp + 0x38]
push eax
push ebx
call sub.MSVCRT.dll__ftol
lea edx, [esp + 0x6c]
push eax
push edx
call dword [sym.imp.USER32.dll_SetRect]
lea eax, [esi*4]
push edi
sub eax, esi
neg eax
shl eax, 4
mov dword [esp + 0x50], eax
fild dword [esp + 0x50]
fld st(0)
fadd qword [0x458310]
fmul qword [esp + 0x30]
fadd qword [esp + 0x40]
fadd qword [esp + 0x38]
call sub.MSVCRT.dll__ftol
fmul qword [esp + 0x30]
push eax
push ebx
fadd qword [esp + 0x48]
fadd qword [esp + 0x40]
call sub.MSVCRT.dll__ftol
lea ecx, [esp + 0xe8]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa0]
lea edx, [esi + esi*2]
rep stosd dword es:[edi], eax
mov eax, 0x30
xor ebx, ebx
shl edx, 4
cmp esi, 6
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa0], edx
jne 0x40c572
mov edi, dword [esp + 0x10]
push ebx
lea ecx, [edi + 0xb3c]
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetHeight_unsigned_int_
test eax, eax
ja 0x40c58f
jmp 0x40c5d1
cmp esi, 5
jne 0x40c5cd
mov eax, dword [esp + 0x10]
push ebx
lea ecx, [eax + 0xb60]
call sym.twinrpg.exe_public:_unsigned_int___thiscall_CxImage::GetHeight_unsigned_int_
test eax, eax
jbe 0x40c5cd
mov edi, dword [esp + 0x10]
mov edx, dword [edi + 0x3104]
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0xa0]
add edx, eax
mov eax, dword [edi + 0x3100]
push ecx
push ebx
push edx
mov edx, dword [esp + 0x6c]
lea ecx, [esi + esi*8]
shl ecx, 2
add eax, edx
mov edx, ecx
mov ecx, edi
mov dword [esp + 0xac], ebx
sub ecx, edx
push eax
add ecx, 0xc14
jmp 0x40c5fa
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 0x3104]
mov esi, dword [esp + 0x64]
mov edx, dword [edi + 0x3100]
lea eax, [esp + 0xa0]
push eax
add ecx, esi
push ebx
push ecx
mov ecx, dword [esp + 0x6c]
add edx, ecx
lea ecx, [edi + 0x98c]
push edx
call sym.twinrpg.exe_public:_void___thiscall_CxImage::Draw_int__int__unsigned_int__struct_CxImage::_DRAW_PARA__
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add eax, 0x30
inc esi
cmp eax, 0x180
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
jl 0x40c44c
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
add eax, 0x30
add esi, 0x19
cmp eax, 0x180
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], eax
jl 0x40c43c
push 0x28
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x493e10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [esp + 0x18]
dec eax
test eax, eax
mov dword [esp + 0x18], eax
jg 0x40c41f
lea ecx, [esp + 0xec]
call sym.twinrpg.exe_public:_void___thiscall_CxImage::constructor_void_
lea ecx, [esp + 0x58]
mov dword [esp + 0x118], 0
call sub.MFC42.DLL_CString::CString_1
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x5c]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push esi
mov byte [esp + 0x120], 1
call ebx
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
mov esi, dword [sym.imp.GDI32.dll_DeleteDC]
call esi
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x28]
push eax
push edi
call ebx
push edi
call esi
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
push ecx
mov eax, dword [edx + 0x324c]
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, 0x4939e0
call fcn.004246c0
lea ecx, [esp + 0x58]
mov byte [esp + 0x118], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xec]
mov dword [esp + 0x118], 0xffffffff
call sym.twinrpg.exe_public_virtual:_void___thiscall_CxImage::destructor_void_
mov ecx, dword [esp + 0x110]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4