Function at 0x427860
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [esp + 0x60]
cmp dword [esp + 0x64], 8
mov eax, dword [esi + 0x11c]
jg 0x427938
mov ecx, 0x186a0
test eax, eax
jle 0x427910
fild dword [esi + 0x118]
fdivr qword [0x502d00]
mov dword [esp + 0x10], eax
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fild dword [esp + 0x10]
fdivp st(1)
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427d00
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jb 0x427d08
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x3e]
mov ecx, dword [esp + 0x10]
lea esi, [esi]
lea esi, [esi]
lea edx, [esi + 0x120]
mov eax, esi
call sym._png_build_8bit_table
test dword [esi + 0x30], 0x600080
jne 0x427de0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [esi + 0xe2], 2
jne 0x427cd0
movzx ebx, byte [esi + 0x13b]
mov ecx, dword [esi + 0x30]
lea edx, [ebx - 1]
mov edi, ecx
and edi, 0x400
mov dword [esp + 0x10], edi
cmp dl, 0xe
jbe 0x427d18
xor edx, edx
test edi, edi
jne 0x427ee0
and ecx, 0x480
mov dword [esi + 0x114], edx
je 0x427d52
mov dword [esp + 0x18], 0x186a0
test eax, eax
jle 0x427a02
fild dword [esi + 0x118]
fld qword [0x502cb0]
mov dword [esp + 0x14], eax
fnstcw word [esp + 0x3e]
fmulp st(1)
fild dword [esp + 0x14]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
fmulp st(1)
fadd dword [0x502cbc]
mov word [esp + 0x3a], ax
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x4279f8
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jae 0x428008
fstp st(0)
jmp 0x4279fa
fstp st(0)
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x10]
mov eax, 8
mov dword [esp], esi
sub eax, ebx
mov edi, eax
mov dword [esp + 0x14], eax
mov eax, 1
mov ecx, edi
mov edx, eax
shl edx, cl
mov ecx, 0x10
sub ecx, ebx
mov ebx, 4
mov dword [esp + 0x30], edx
shl eax, cl
mov ecx, edi
shl ebx, cl
sub eax, 1
mov dword [esp + 4], ebx
mov dword [esp + 0x20], eax
call sym._png_calloc
mov dword [esp + 0x1c], eax
mov edi, eax
add ebx, eax
mov dword [esi + 0x12c], eax
lea esi, [esi]
mov dword [esp + 4], 0x200
add edi, 4
mov dword [esp], esi
call sym._png_malloc
mov dword [edi - 4], eax
cmp ebx, edi
jne 0x427a58
movzx ecx, byte [esp + 0x10]
fild dword [esp + 0x18]
mov eax, 0xff
xor ebx, ebx
fmul qword [0x502cb0]
mov dword [esp + 0x34], esi
mov edi, pe_nt_image_headers32
shr eax, cl
mov dword [esp + 0x24], eax
fstp qword [esp + 0x28]
lea esi, [esi]
nop
fld qword [esp + 0x28]
mov dword [esp + 0x18], edi
lea esi, [edi - 0x80]
fstp qword [esp + 8]
fld dword [0x502cb8]
fild dword [esp + 0x18]
fdivrp st(1)
fstp qword [esp]
call sym._pow
fld qword [0x502d08]
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
fmulp st(1)
fadd dword [0x502cbc]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
movzx eax, word [esp + 0x3e]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
mov eax, 0x80008001
fldcw word [esp + 0x3c]
fistp dword [esp + 0x18]
fldcw word [esp + 0x3e]
mov edx, dword [esp + 0x18]
movzx edx, dx
imul edx, dword [esp + 0x20]
add edx, 0x8000
mul edx
shr edx, 0xf
lea eax, [edx + 1]
cmp eax, ebx
jbe 0x427b5c
mov dword [esp + 0x18], eax
nop
movzx ecx, byte [esp + 0x14]
mov eax, ebx
mov ebp, dword [esp + 0x24]
shr eax, cl
and ebp, ebx
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax + ebp*4]
mov word [ebp + ecx*2], si
mov ecx, ebx
add ebx, 1
cmp edx, ecx
jne 0x427b30
mov eax, dword [esp + 0x18]
mov ebx, eax
add edi, 0x101
cmp edi, 0x1007f
jne 0x427aa0
mov edi, dword [esp + 0x30]
movzx ecx, byte [esp + 0x10]
mov edx, 0xff
mov esi, dword [esp + 0x34]
shl edi, 8
sar edx, cl
cmp ebx, edi
jae 0x427bbf
mov dword [esp + 0x18], esi
mov ebp, dword [esp + 0x1c]
lea esi, [esi]
movzx ecx, byte [esp + 0x14]
mov eax, edx
mov esi, ebx
and eax, ebx
add ebx, 1
shr esi, cl
mov eax, dword [ebp + eax*4]
mov ecx, esi
mov esi, 0xffffffff
mov word [eax + ecx*2], si
cmp ebx, edi
jne 0x427b98
mov esi, dword [esp + 0x18]
test dword [esi + 0x30], 0x600080
je 0x42792a
fild dword [esi + 0x118]
fdivr dword [0x502cfc]
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427c28
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jae 0x427fb8
fstp st(0)
jmp 0x427c2a
fstp st(0)
xor eax, eax
mov dword [esp], eax
mov ecx, dword [esp + 0x10]
mov eax, esi
lea edx, [esi + 0x134]
call sym._png_build_16bit_table
mov eax, dword [esi + 0x11c]
test eax, eax
jle 0x427f70
fnstcw word [esp + 0x3e]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fdivr dword [0x502cfc]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427f28
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jb 0x427f30
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x14]
fldcw word [esp + 0x3e]
mov eax, dword [esp + 0x14]
jmp 0x427f34
movzx edx, byte [esi + 0x138]
movzx ebx, byte [esi + 0x139]
cmp bl, dl
jb 0x427ef8
movzx edx, byte [esi + 0x13a]
cmp bl, dl
jae 0x42794c
mov ebx, edx
jmp 0x42794c
fstp st(0)
jmp 0x427d0a
fstp st(0)
xor ecx, ecx
jmp 0x427910
mov edx, 0x10
sub edx, ebx
cmp dl, 4
ja 0x427d30
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x427ee0
cmp dl, 8
ja 0x427f10
movzx edx, dl
mov dword [esp + 0x10], edx
and ecx, 0x480
mov dword [esi + 0x114], edx
jne 0x427983
mov edx, 0x186a0
test eax, eax
jle 0x427dc4
fild dword [esi + 0x118]
fld qword [0x502d00]
mov dword [esp + 0x14], eax
fnstcw word [esp + 0x3e]
fdivrp st(1)
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fild dword [esp + 0x14]
fdivp st(1)
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427dc0
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jae 0x427fe0
fstp st(0)
jmp 0x427dc2
fstp st(0)
xor edx, edx
mov dword [esp], edx
lea eax, [esi + 0x12c]
mov ecx, dword [esp + 0x10]
mov edx, eax
mov eax, esi
call sym._png_build_16bit_table
jmp 0x427bbf
fild dword [esi + 0x118]
fdivr dword [0x502cfc]
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427e40
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jae 0x427f90
fstp st(0)
jmp 0x427e42
fstp st(0)
xor ecx, ecx
mov eax, esi
lea edx, [esi + 0x128]
call sym._png_build_8bit_table
mov eax, dword [esi + 0x11c]
test eax, eax
jle 0x427f80
fnstcw word [esp + 0x3e]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fdivr dword [0x502cfc]
movzx eax, word [esp + 0x3e]
and ah, 0xf3
or ah, 4
mov word [esp + 0x3a], ax
fadd dword [0x502cbc]
fldcw word [esp + 0x3a]
frndint
fldcw word [esp + 0x3e]
fld qword [0x502cf0]
fcomp st(1)
fnstsw ax
sahf
jb 0x427f50
fld dword [0x502cf8]
fxch st(1)
fcom st(1)
fnstsw ax
fstp st(1)
sahf
jb 0x427f58
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x3e]
mov ecx, dword [esp + 0x10]
jmp 0x427f5c
mov dword [esp + 0x10], 5
mov edx, 5
jmp 0x427971
mov ebx, edx
movzx edx, byte [esi + 0x13a]
cmp bl, dl
jae 0x42794c
jmp 0x427cf5
mov edx, 8
movzx edx, dl
mov dword [esp + 0x10], edx
jmp 0x427d40
fstp st(0)
jmp 0x427f32
fstp st(0)
xor eax, eax
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x10]
add esp, 0x4c
mov eax, esi
pop ebx
lea edx, [esi + 0x130]
pop esi
pop edi
pop ebp
jmp sym._png_build_16bit_table
fstp st(0)
jmp 0x427f5a
fstp st(0)
xor ecx, ecx
add esp, 0x4c
lea edx, [esi + 0x124]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
jmp sym._png_build_8bit_table
mov eax, dword [esi + 0x118]
jmp 0x427f34
mov ecx, dword [esi + 0x118]
jmp 0x427f5c
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x3e]
mov ecx, dword [esp + 0x10]
jmp 0x427e44
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x14]
fldcw word [esp + 0x3e]
mov eax, dword [esp + 0x14]
jmp 0x427c2c
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x14]
fldcw word [esp + 0x3e]
mov edx, dword [esp + 0x14]
jmp 0x427dc4
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x18]
fldcw word [esp + 0x3e]
jmp 0x427a02