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

Disassembly:
sub esp, 0x64
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
mov esi, dword [esp + 0x78]
push edi
mov edi, ecx
mov dword [esp + 0x40], edi
cmp ebx, dword [edi + 0x18]
jne 0x4ad063
cmp esi, dword [edi + 0x1c]
je 0x4ad644
cmp dword [edi + 4], 0
je 0x4ad644
cmp dword [edi + 8], 0
je 0x4ad644
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4ad644
cmp dword [edi + 0x24], 0
je 0x4ad764
test ebx, ebx
jle 0x4ad638
test esi, esi
jle 0x4ad638
imul eax, ebx
imul eax, esi
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebp, eax
push 0x3c
mov dword [esp + 0x74], ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 8
test eax, eax
je 0x4ad0cd
push 0
push dword [edi + 0xc]
mov ecx, eax
push esi
push ebx
push ebp
call fcn.004acbc0
jmp 0x4ad0cf
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [eax + 0x28], 1
mov eax, dword [edi + 0x10]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4ad0f0
mov ecx, dword [edi + 0x18]
imul ecx, dword [edi + 0xc]
mov dword [esp + 0x18], ecx
cmp dword [0x59a604], 0
mov eax, dword [edi + 0x18]
jne 0x4ad1e1
cdq
idiv ebx
mov esi, dword [edi + 0xc]
mov ecx, esi
imul ecx, eax
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x54], edx
cdq
idiv dword [esp + 0x7c]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x4c], edx
xor edx, edx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], eax
imul edx, dword [esp + 0x18]
mov eax, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], eax
add edx, dword [edi + 0x24]
xor ecx, ecx
mov ebx, esi
test esi, esi
jle 0x4ad165
nop
mov al, byte [edx + ecx]
inc ecx
mov byte [ebp], al
inc ebp
mov esi, dword [edi + 0xc]
cmp ecx, esi
jl 0x4ad150
mov eax, dword [esp + 0x24]
mov ebx, esi
sub eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
dec dword [esp + 0x28]
add ecx, edx
mov edx, dword [esp + 0x78]
add edx, eax
test eax, eax
cmovg edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], edx
lea edx, [ebx + ecx]
cmovg edx, ecx
test eax, eax
mov eax, dword [esp + 0x24]
jg 0x4ad147
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x4c]
dec dword [esp + 0x20]
test ecx, ecx
mov ebx, dword [esp + 0x7c]
lea edx, [eax + 1]
cmovg edx, eax
add ebx, ecx
test ecx, ecx
mov dword [esp + 0x40], edx
cmovg ebx, ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x78]
test ecx, ecx
jg 0x4ad135
mov eax, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
mov ecx, dword [edi + 0x1c]
dec eax
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x10], ecx
movd xmm1, eax
lea eax, [ecx - 1]
cvtdq2ps xmm1, xmm1
movd xmm2, eax
xor eax, eax
divss xmm1, xmm0
mov dword [esp + 0x58], eax
movd xmm0, esi
xor esi, esi
cvtdq2ps xmm2, xmm2
mov dword [esp + 0x3c], esi
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x60], xmm1
divss xmm2, xmm0
movss dword [esp + 0x70], xmm2
nop dword [eax + eax]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mulss xmm1, xmm2
comiss xmm1, xmm0
movss dword [esp + 0x14], xmm1
jb 0x4ad27a
lea eax, [ecx - 1]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x14], xmm0
call fcn.005166e0
mov edx, eax
shr eax, 0x1f
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x56bed0]
jmp 0x4ad29a
movaps xmm0, xmm1
call fcn.005166e0
mov edx, eax
mov ecx, edx
shr ecx, 0x1f
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [ecx*8 + 0x56bed0]
movss xmm2, dword [esp + 0x14]
xor eax, eax
mov ebx, dword [esp + 0x18]
movaps xmm1, xmm2
addss xmm2, dword [0x569318]
cvtpd2ps xmm0, xmm0
mov ecx, esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], esi
imul ebx, edx
subss xmm1, xmm0
movss dword [esp + 0x64], xmm2
movss xmm0, dword [0x569318]
mov dword [esp + 0x44], ebx
subss xmm0, xmm1
movss dword [esp + 0x50], xmm1
movss dword [esp + 0x68], xmm0
nop dword [eax + eax]
mov esi, dword [edi + 0xc]
mov ebx, ecx
movd xmm0, eax
mov eax, dword [edi + 0x18]
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x34], esi
movd xmm1, eax
mulss xmm0, dword [esp + 0x60]
imul ebx, esi
cvtdq2ps xmm1, xmm1
add ebx, ebp
movss dword [esp + 0x30], xmm0
comiss xmm0, xmm1
jb 0x4ad32e
dec eax
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x30], xmm0
call fcn.005166e0
movss xmm1, dword [esp + 0x30]
mov ecx, eax
shr ecx, 0x1f
movaps xmm2, xmm1
mov dword [esp + 0x2c], eax
movd xmm0, eax
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [ecx*8 + 0x56bed0]
cvtpd2ps xmm0, xmm0
subss xmm2, xmm0
movaps xmm0, xmm1
addss xmm0, dword [0x569318]
movss dword [esp + 0x4c], xmm2
movd xmm2, dword [edi + 0x18]
cvtdq2ps xmm2, xmm2
comiss xmm0, xmm2
jae 0x4ad37f
movaps xmm1, xmm0
movaps xmm0, xmm1
call fcn.005166e0
movd xmm0, dword [esp + 0x10]
movss xmm1, dword [esp + 0x64]
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x30], eax
comiss xmm1, xmm0
jb 0x4ad3ad
movss xmm0, dword [esp + 0x14]
movss dword [esp + 0x48], xmm0
jmp 0x4ad3b3
movss dword [esp + 0x48], xmm1
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov edi, dword [edi + 0x24]
add eax, edi
imul ecx, esi
push esi
add eax, ecx
mov dword [esp + 0x30], ecx
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00517140
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x50]
imul ecx, esi
add eax, edi
push esi
add eax, ecx
mov dword [esp + 0x40], ecx
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00517140
movss xmm0, dword [esp + 0x60]
add esp, 0x18
call fcn.005166e0
mov ecx, dword [esp + 0x2c]
mov esi, eax
imul esi, dword [esp + 0x18]
lea eax, [esp + 0x24]
push dword [esp + 0x34]
add ecx, edi
add ecx, esi
push ecx
push eax
call fcn.00517140
mov eax, dword [esp + 0x3c]
push dword [esp + 0x40]
add eax, edi
add eax, esi
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00517140
mov eax, dword [esp + 0x4c]
add esp, 0x18
mov edx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
cmp eax, 4
jne 0x4ad500
movss xmm1, dword [0x569314]
xor edx, edx
nop dword [eax]
movzx eax, byte [esp + edx + 0x1c]
movzx ecx, byte [esp + 0x1f]
imul ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
movzx ecx, byte [esp + edx + 0x20]
divss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [esp + edx + 0x1c], al
movzx eax, byte [esp + 0x23]
imul ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
movzx ecx, byte [esp + 0x27]
divss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [esp + edx + 0x20], al
movzx eax, byte [esp + edx + 0x24]
imul ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
movzx ecx, byte [esp + 0x2b]
divss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [esp + edx + 0x24], al
movzx eax, byte [esp + edx + 0x28]
imul ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
divss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [esp + edx + 0x28], al
inc edx
cmp edx, 3
jl 0x4ad460
movss xmm3, dword [0x569318]
xor ecx, ecx
movss xmm4, dword [esp + 0x4c]
subss xmm3, xmm4
jmp 0x4ad518
movss xmm3, dword [0x569318]
xor ecx, ecx
movss xmm4, dword [esp + 0x4c]
subss xmm3, xmm4
test eax, eax
jle 0x4ad595
mov edi, dword [esp + 0x40]
nop dword [eax]
movzx eax, byte [esp + ecx + 0x1c]
xorps xmm2, xmm2
xorps xmm0, xmm0
xorps xmm1, xmm1
cvtsi2ss xmm2, eax
movzx eax, byte [esp + ecx + 0x20]
cvtsi2ss xmm0, eax
movzx eax, byte [esp + ecx + 0x24]
mulss xmm2, xmm3
mulss xmm0, xmm4
cvtsi2ss xmm1, eax
movzx eax, byte [esp + ecx + 0x28]
addss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
mulss xmm2, dword [esp + 0x68]
mulss xmm1, xmm3
mulss xmm0, xmm4
addss xmm1, xmm0
mulss xmm1, dword [esp + 0x50]
addss xmm2, xmm1
cvttss2si eax, xmm2
mov byte [ecx + ebx], al
inc ecx
cmp ecx, dword [edi + 0xc]
jl 0x4ad520
mov edx, dword [edi + 0x1c]
mov ebp, dword [esp + 0x6c]
mov eax, dword [edi + 0xc]
mov dword [esp + 0x10], edx
jmp 0x4ad599
mov edi, dword [esp + 0x40]
cmp eax, 4
jne 0x4ad5e4
cmp byte [ebx + 3], 0
mov dword [esp + 0x10], edx
je 0x4ad5e4
movss xmm2, dword [0x569314]
xor ecx, ecx
movzx eax, byte [ebx + ecx]
movd xmm1, eax
movzx eax, byte [ebx + 3]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, xmm2
divss xmm1, xmm0
cvttss2si eax, xmm1
mov byte [ebx + ecx], al
inc ecx
cmp ecx, 3
jl 0x4ad5b2
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x54]
inc eax
mov ebx, dword [esp + 0x78]
inc ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], ecx
cmp eax, ebx
jl 0x4ad2f0
mov eax, dword [esp + 0x58]
add dword [esp + 0x3c], ebx
inc eax
mov ecx, dword [edi + 0x1c]
movss xmm2, dword [esp + 0x70]
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x58], eax
cmp eax, dword [esp + 0x7c]
jl 0x4ad230
mov eax, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret 8
cmp dword [edi + 0x24], 0
je 0x4ad764
mov ebp, dword [esp + 0x78]
lea ebx, [edi + 0xc]
mov eax, ebp
mov dword [esp + 0x6c], ebx
imul eax, esi
imul eax, dword [ebx]
push eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ecx, eax
add esp, 4
mov eax, dword [edi + 0x10]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x70], eax
test eax, eax
je 0x4ad6c6
mov ebp, dword [ebx]
imul ebp, dword [esp + 0x78]
cmp eax, ebp
je 0x4ad6c2
mov eax, dword [esp + 0x7c]
mov ebx, ecx
mov esi, dword [edi + 0x24]
test eax, eax
jle 0x4ad6b8
mov edi, eax
push ebp
push esi
push ebx
call fcn.00517140
add esi, dword [esp + 0x7c]
add esp, 0xc
add ebx, ebp
sub edi, 1
jne 0x4ad695
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x78]
add ebx, 0xc
jmp 0x4ad6db
mov ebx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x78]
jmp 0x4ad6db
mov ebp, dword [esp + 0x78]
mov eax, dword [ebx]
imul eax, ebp
imul eax, esi
push eax
push dword [edi + 0x24]
push ecx
call fcn.00517140
add esp, 0xc
push 0x3c
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
test esi, esi
je 0x4ad74f
mov eax, dword [ebx]
mov ecx, dword [esp + 0x7c]
mov dword [esi + 0xc], eax
lea eax, [esi + 0x24]
mov dword [esi + 8], ecx
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x68]
mov dword [esi + 4], ebp
mov dword [esi + 0x18], ebp
mov dword [esi + 0x20], eax
pop edi
mov dword [esi], vtable.Fl_RGB_Image.0
mov dword [eax], ecx
mov eax, esi
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x14], 1
mov dword [esi + 0x10], 0
mov dword [esi + 0x28], 1
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
xor esi, esi
pop edi
mov eax, esi
mov dword [esi + 0x28], 1
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
push 0x3c
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
test esi, esi
je 0x4ad7d7
mov eax, dword [edi + 0xc]
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x24]
mov ebp, dword [esp + 0x7c]
mov dword [esi + 0xc], eax
lea eax, [esi + 0x24]
pop edi
mov dword [esi + 0x20], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ebp
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebp
mov dword [eax], ecx
mov eax, esi
mov dword [esi], vtable.Fl_RGB_Image.0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x14], 1
mov dword [esi + 0x10], edx
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 8