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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51e338
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x589560]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov edi, ecx
cmp byte [edi + 0x354], 0
je 0x497838
cmp byte [edi + 0x1ac], 0
je 0x497838
xor ebx, ebx
cmp dword [edi + 0x364], ebx
je 0x497838
xor eax, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
lea esi, [esp + 0x3c]
mov eax, edi
mov dword [esp + 0x3c], ebx
call fcn.00452e50
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x58], ebx
mov eax, dword [ebp + 8]
mov dword [esp + 0x98], ebx
mov ecx, dword [edi + 0x36c]
mov edx, dword [edi + 0x368]
mov eax, dword [eax + 4]
push 0x20
push ecx
push edx
lea esi, [esp + 0x58]
call fcn.004431b0
add esp, 0xc
test al, al
je 0x49782f
mov al, byte [edi + 0x338]
mov ecx, dword [edi + 0x364]
mov edx, dword [esp + 0x5c]
mov byte [esp + 0x5a], al
mov eax, dword [edi + 0x36c]
imul eax, dword [edi + 0x368]
add eax, eax
add eax, eax
push eax
push ecx
push eax
push edx
call fcn.004fe295
mov eax, dword [edi + 0x36c]
mov edx, dword [esp + 0x68]
mov ecx, dword [edi + 0x368]
add esp, 0x10
push edx
mov edx, dword [esp + 0x50]
push eax
push ecx
push ebx
push ebx
push edx
mov edx, dword [ebp + 8]
push eax
mov eax, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x5c]
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call dword [sym.imp.MSIMG32.dll_AlphaBlend]
call fcn.00448ec0
mov esi, dword [edi + 0x388]
cmp esi, ebx
jl 0x49782f
cmp esi, dword [edi + 0x38c]
je 0x49782f
mov ecx, dword [edi + 0x340]
mov dword [edi + 0x38c], esi
mov ecx, dword [ecx + 4]
lea edx, [esp + 0x30]
lea eax, [ebx + 6]
call fcn.004915f0
test al, al
je 0x49782f
mov ecx, dword [edi + 0x368]
mov ebx, dword [edi + 0x36c]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax - 4]
imul eax, esi
mov esi, ecx
sub ebx, 4
imul esi, ebx
add eax, 2
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], eax
xor ecx, ecx
mov eax, esi
mov edx, 4
mul edx
seto cl
mov dword [esp + 0x2c], esi
neg ecx
or ecx, eax
push ecx
call fcn.004fc111
mov ecx, dword [edi + 0x364]
mov dword [esp + 0x2c], ecx
xor esi, esi
xor ecx, ecx
add esp, 4
cmp ebx, esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
jle 0x497770
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
test edx, edx
jle 0x497758
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], edx
mov edx, dword [edi + 0x368]
lea eax, [ecx + 2]
imul edx, eax
mov eax, dword [esp + 0x28]
add edx, esi
add edx, dword [esp + 0x24]
mov eax, dword [eax + edx*4]
mov edx, eax
and edx, 0xff000000
cmp edx, 0xff000000
je 0x497733
mov edx, dword [esp + 0x10]
mov dword [edx], eax
jmp 0x497748
mov eax, dword [esp + 0x30]
mov ecx, dword [eax]
call fcn.004422d0
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
add dword [esp + 0x10], 4
add esi, 1
cmp esi, edx
jl 0x497702
add ecx, 1
lea eax, [edx*4]
add dword [esp + 0x18], eax
xor esi, esi
cmp ecx, ebx
mov dword [esp + 0x1c], ecx
jl 0x4976f6
mov edx, dword [esp + 0x14]
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
push 0x20
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov dword [esp + 0x7c], esi
push ebx
push edx
lea esi, [esp + 0x78]
call fcn.004431b0
add esp, 0xc
test al, al
jne 0x4977c2
mov eax, dword [esp + 0x20]
push eax
call fcn.004ff376
add esp, 4
jmp 0x497826
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x7c]
add eax, eax
add eax, eax
push eax
push esi
push eax
push ecx
call fcn.004fe295
push esi
call fcn.004ff376
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x80]
add esp, 0x14
push edx
mov edx, dword [esp + 0x44]
push ebx
push eax
push 0
push 0
push ecx
mov ecx, dword [esp + 0x3c]
push ebx
push eax
mov eax, dword [esp + 0x5c]
add edx, 2
push edx
mov edx, dword [edi + 4]
add ecx, eax
push ecx
push edx
call dword [sym.imp.MSIMG32.dll_AlphaBlend]
lea esi, [esp + 0x6c]
call fcn.00448ec0
lea esi, [esp + 0x6c]
call fcn.00448ec0
lea esi, [esp + 0x4c]
call fcn.00448ec0
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4