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

Disassembly:
sub esp, 0x88
mov ecx, dword [esp + 0xb4]
mov edx, dword [esp + 0x98]
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa8]
mov ebx, dword [esp + 0xd4]
push edi
mov edi, eax
mov eax, 1
shl eax, cl
push 0x10
mov ebp, ebx
lea edx, [eax + edx - 1]
lea eax, [eax + esi - 1]
shr eax, cl
shr edx, cl
mov esi, eax
imul esi, edx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xe0]
mov ecx, dword [eax]
xor eax, eax
push eax
push 0x39
mov dword [esp + 0x6c], edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
call sym.libwebp.dll_WebPSafeMalloc
mov dword [esp + 0x40], eax
xor eax, eax
push 2
push eax
push esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
call sym.libwebp.dll_WebPSafeMalloc
mov edx, dword [edi]
mov ecx, dword [edi + 8]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x84], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x80], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x90], eax
xor eax, eax
mov dword [esp + 0x8c], edx
mov dword [esp + 0x88], ecx
mov ecx, dword [edi + 0x14]
push eax
lea edx, [esp + 0x9c]
push edx
mov dword [esp + 0x9c], ecx
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
call fcn.10058850
add esp, 0x20
test eax, eax
jne 0x1004a37b
mov eax, dword [esp + 0xd4]
push 1
push eax
jmp 0x1004a951
cmp dword [esp + 0x34], 0
je 0x1004a947
cmp dword [esp + 0x1c], 0
je 0x1004a947
lea ecx, [esp + 0x50]
push esi
push ecx
call fcn.10036140
add esp, 8
test eax, eax
je 0x1004a947
mov ecx, dword [esp + 0xb4]
mov eax, 0x66666667
imul ebx
mov eax, dword [esp + 0xd4]
sar edx, 1
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, dword [esp + 0xdc]
push edx
mov edx, dword [esp + 0xb0]
push esi
push eax
mov eax, dword [esp + 0xb4]
push ecx
mov ecx, dword [esp + 0xac]
push edx
mov edx, dword [esp + 0xc4]
push eax
mov eax, dword [esp + 0xb8]
push ecx
push edx
push eax
call fcn.10036190
add esp, 0x24
test eax, eax
je 0x1004a959
add dword [esp + 0x38], esi
sub ebp, esi
xor esi, esi
mov dword [esp + 0x48], ebp
cmp dword [esp + 0xb8], esi
je 0x1004a43a
mov ecx, dword [esp + 0xc0]
mov eax, dword [ecx]
cmp eax, esi
jne 0x1004a434
mov dword [esp + 0x3c], 0xa
jmp 0x1004a43e
mov dword [esp + 0x3c], eax
jmp 0x1004a43e
mov dword [esp + 0x3c], esi
mov ebx, dword [esp + 0xbc]
cmp dword [ebx + 0x18], 1
jg 0x1004a450
cmp dword [ebx + 0xc], esi
je 0x1004a474
lea edx, [esp + 0x80]
push edx
push edi
call fcn.10058880
add esp, 8
test eax, eax
jne 0x1004a474
mov eax, dword [esp + 0xd4]
push 1
push eax
jmp 0x1004a951
mov ecx, dword [ebx + 0x18]
cmp ecx, esi
mov dword [esp + 0x44], esi
jle 0x1004a902
add ebx, 0xc
mov dword [esp + 0x2c], ebx
lea ebx, [ebx]
mov eax, ebp
cdq
idiv ecx
mov ecx, dword [esp + 0xdc]
push ecx
mov ecx, dword [esp + 0xa8]
mov ebp, eax
cdq
and edx, 3
add eax, edx
mov edx, dword [esp + 0xd8]
sar eax, 2
push eax
push edx
mov edx, dword [esp + 0xac]
sub ebp, eax
lea eax, [esp + 0x68]
push eax
mov eax, dword [ebx]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [ebx - 4]
push eax
mov eax, dword [esp + 0xd0]
push ecx
mov ecx, dword [esp + 0xd0]
push edx
mov edx, dword [esp + 0xc0]
push eax
mov eax, dword [esp + 0xd4]
push ecx
mov ecx, dword [esp + 0xd4]
push edx
push eax
push ecx
call fcn.10037a20
add esp, 0x38
test eax, eax
je 0x1004a959
xor edx, edx
xor esi, esi
cmp dword [ebx], edx
mov dword [esp + 0x30], esi
setne dl
inc edx
test edx, edx
jle 0x1004a8dc
jmp 0x1004a528
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x5c]
mov ebx, esi
neg ebx
sbb ebx, ebx
not ebx
and ebx, eax
mov dword [esp + 0x4c], ebx
cmp esi, 1
jne 0x1004a547
test eax, eax
je 0x1004a8d8
lea eax, [esp + 0x68]
push edi
push eax
call fcn.10058910
mov ecx, dword [esp + 0x30]
push ebx
push ecx
call fcn.1003cb90
push ebx
mov dword [esp + 0x24], eax
call fcn.1003cb10
add esp, 0x14
cmp dword [esp + 0x10], 0
mov ecx, eax
mov dword [esp + 0x24], ecx
je 0x1004a931
test ecx, ecx
je 0x1004a931
mov eax, 0x55555556
imul ebp
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [esi + esi*2]
mov esi, dword [esp + 0xa4]
lea edx, [esi + edx*8]
mov esi, dword [esp + 0xdc]
push esi
push eax
sub ebp, eax
mov eax, dword [esp + 0xdc]
push eax
mov eax, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0xd4]
push ecx
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0xcc]
push ebx
push eax
mov eax, dword [esp + 0xd0]
push ecx
mov ecx, dword [esp + 0xd0]
push eax
push edx
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0xd4]
push ecx
push edx
call fcn.1003cd80
add esp, 0x34
test eax, eax
je 0x1004a959
mov eax, dword [esp + 0x10]
mov esi, dword [eax]
push 0xc
lea ecx, [esi + esi*4]
push 0
push ecx
call sym.libwebp.dll_WebPSafeCalloc
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
je 0x1004a947
mov edx, dword [esp + 0x10]
push eax
push edx
call fcn.100495c0
add esp, 8
test eax, eax
je 0x1004a947
mov eax, dword [esp + 0x10]
push eax
call fcn.1003a820
mov ecx, dword [esp + 0x28]
push ecx
mov dword [esp + 0x18], 0
call fcn.1003a820
add esp, 8
mov dword [esp + 0x24], 0
push 1
test ebx, ebx
jle 0x1004a678
push 1
push edi
call fcn.100589b0
push 4
push ebx
push edi
call fcn.100589b0
add esp, 0x18
jmp 0x1004a683
push 0
push edi
call fcn.100589b0
add esp, 0xc
xor eax, eax
cmp esi, 1
setg al
push 1
push eax
push edi
mov dword [esp + 0x2c], eax
call fcn.100589b0
add esp, 0xc
cmp dword [esp + 0x20], 0
je 0x1004a763
mov edx, dword [esp + 0x28]
push 4
xor eax, eax
push eax
push edx
call sym.libwebp.dll_WebPSafeMalloc
mov ebx, eax
add esp, 0xc
xor esi, esi
test ebx, ebx
je 0x1004a931
xor ecx, ecx
cmp dword [esp + 0x28], ecx
jbe 0x1004a6ee
lea esp, [esp]
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ecx*2]
mov edx, eax
shl edx, 8
cmp eax, esi
mov dword [ebx + ecx*4], edx
jl 0x1004a6e7
lea esi, [eax + 1]
inc ecx
cmp ecx, dword [esp + 0x28]
jb 0x1004a6d0
mov eax, dword [esp + 0xc4]
push 3
add eax, 0xfffffffe
push eax
push edi
call fcn.100589b0
mov ecx, dword [esp + 0xe8]
push ecx
mov ecx, dword [esp + 0xc4]
mov eax, ebp
cdq
sub eax, edx
mov edx, dword [esp + 0xe4]
push edx
mov edx, dword [esp + 0xc4]
push ecx
mov ecx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0x7c]
push ecx
mov ecx, dword [esp + 0xc4]
push edx
add ecx, 0x30
push ecx
lea edx, [esp + 0x78]
push edx
sar eax, 1
push ebx
push edi
sub ebp, eax
call fcn.1004a010
add esp, 0x34
push ebx
test eax, eax
je 0x1004a93d
call sym.libwebp.dll_WebPFree
mov ebx, dword [esp + 0x50]
add esp, 4
lea esi, [esi + esi*4]
xor eax, eax
mov dword [esp + 0x20], esi
test esi, esi
jle 0x1004a784
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
cmp eax, edx
jge 0x1004a77c
mov eax, edx
add ecx, 0xc
sub esi, 1
jne 0x1004a774
cdq
push 2
push edx
push eax
call sym.libwebp.dll_WebPSafeMalloc
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x1004a36c
cmp dword [esp + 0x20], 0
jle 0x1004a7d7
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
lea esp, [esp]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
push eax
push ecx
mov ecx, esi
call fcn.10049c10
add esp, 8
mov ecx, esi
call fcn.100498c0
add esi, 0xc
sub ebx, 1
jne 0x1004a7b0
mov ebx, dword [esp + 0x4c]
mov edx, dword [esp + 0xd4]
mov eax, dword [esp + 0x14]
mov esi, dword [edi + 4]
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0xcc]
push ecx
mov ecx, dword [esp + 0xb4]
add esi, 7
sar esi, 3
sub esi, dword [edi + 8]
push edx
sub esi, dword [esp + 0xd8]
push eax
add esi, dword [edi + 0xc]
push ecx
push edi
call fcn.10049d00
add esp, 0x1c
test eax, eax
je 0x1004a959
mov edx, dword [edi + 4]
add edx, 7
sar edx, 3
sub edx, dword [edi + 8]
add edx, dword [edi + 0xc]
cmp edx, dword [esp + 0x40]
jae 0x1004a891
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0xcc]
add eax, 7
sar eax, 3
sub eax, dword [edi + 8]
add eax, dword [edi + 0xc]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xc0]
mov dword [eax], ebx
mov eax, dword [esp + 0xd0]
mov dword [ecx], esi
mov edx, dword [edi + 4]
add edx, 7
sar edx, 3
sub edx, dword [edi + 8]
lea ecx, [esp + 0x80]
sub edx, esi
sub edx, dword [esp + 0xc8]
push ecx
add edx, dword [edi + 0xc]
push edi
mov dword [eax], edx
call fcn.10058940
add esp, 8
mov edx, dword [esp + 0x18]
push edx
call sym.libwebp.dll_WebPFree
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 8]
xor ebx, ebx
push eax
mov dword [esp + 0x20], ebx
call sym.libwebp.dll_WebPFree
push esi
call sym.libwebp.dll_WebPFree
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
inc eax
xor ecx, ecx
add esp, 0xc
cmp dword [edx], ebx
mov dword [esp + 0x14], ebx
setne cl
mov dword [esp + 0x30], eax
inc ecx
cmp eax, ecx
jl 0x1004a524
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0xbc]
mov ecx, dword [ecx + 0x18]
mov ebp, dword [esp + 0x48]
inc eax
add ebx, 8
cmp eax, ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x2c], ebx
jl 0x1004a490
lea eax, [esp + 0x80]
push eax
push edi
call fcn.10058940
mov ecx, dword [esp + 0xe4]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0xdc]
push ecx
add edx, ebp
push edx
push eax
call fcn.1004c5f0
add esp, 0x14
jmp 0x1004a959
mov edx, dword [esp + 0xd4]
push 1
push edx
jmp 0x1004a951
call sym.libwebp.dll_WebPFree
add esp, 4
jmp 0x1004a959
mov ecx, dword [esp + 0xd4]
push 1
push ecx
call fcn.1004c5d0
add esp, 8
mov edx, dword [esp + 0x18]
push edx
call sym.libwebp.dll_WebPFree
mov eax, dword [esp + 0x38]
push eax
call sym.libwebp.dll_WebPFree
mov ecx, dword [esp + 0x18]
push ecx
call fcn.1003a820
mov edx, dword [esp + 0x30]
push edx
call fcn.1003a820
lea eax, [esp + 0x60]
push eax
call fcn.10036170
mov esi, dword [esp + 0x28]
add esp, 0x14
test esi, esi
je 0x1004a9a8
mov ecx, dword [esi + 8]
push ecx
call sym.libwebp.dll_WebPFree
push esi
call sym.libwebp.dll_WebPFree
add esp, 8
mov edx, dword [esp + 0x1c]
push edx
call sym.libwebp.dll_WebPFree
lea eax, [esp + 0x84]
push eax
call fcn.100588e0
mov ecx, dword [esp + 0xdc]
add esp, 8
pop edi
xor eax, eax
cmp dword [ecx + 0x5c], eax
pop esi
pop ebp
sete al
pop ebx
add esp, 0x88
ret