Function at 0x54cf14
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 8]
call fcn.00404778
xor eax, eax
push ebp
push 0x54d8d7
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.00409274
mov edx, dword [ebp - 4]
mov dword [edx + 0x3a0], eax
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
mov eax, dword [ebx + 4]
imul dword [ebx + 8]
mov edx, eax
add edx, edx
mov eax, dword [esi]
call fcn.00407644
mov dword [ebx + 0x1c], 0x3b9ac9ff
xor eax, eax
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0xd28], 1
jne 0x54d2b6
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x18], eax
cmp byte [ebx + 0x11], 0xa
je 0x54cfab
cmp byte [ebx + 0x11], 0xc
jne 0x54d118
cmp byte [ebx + 0x10], 0xc
jne 0x54d118
mov eax, dword [ebx + 0x30]
test eax, eax
jle 0x54d118
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 1
mov edx, dword [ebx + 0x34]
mov eax, dword [ebp - 0xc]
dec eax
mov edi, eax
shl edi, 2
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 0x1c]
call fcn.004027b8
mov dword [ebp - 0x2c], eax
mov edx, dword [ebx + 0x2c]
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.00409350
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
call fcn.004092f8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
dec eax
mov ecx, 3
cdq
idiv ecx
test eax, eax
jl 0x54d0fe
inc eax
mov dword [ebp - 0x34], eax
xor edi, edi
lea eax, [edi + edi*2]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx]
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 1]
mov byte [ebp - 0x26], al
mov al, byte [ebp - 0x26]
and al, 0xf0
and eax, 0xff
shr eax, 4
xor edx, edx
mov dl, byte [ebp - 0x25]
shl edx, 4
and eax, 0xff
add edx, eax
mov eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov al, byte [ebp - 0x26]
and al, 0xf
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dl, byte [edx + ecx + 2]
mov byte [ebp - 0x27], dl
and eax, 0xff
shl eax, 8
xor edx, edx
mov dl, byte [ebp - 0x27]
add eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
inc edi
dec dword [ebp - 0x34]
jne 0x54d078
mov eax, dword [ebp - 0x2c]
call fcn.004027d8
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x24], eax
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x54cfca
cmp byte [ebx + 0x11], 8
jbe 0x54d1de
cmp byte [ebx + 0x10], 0x10
jne 0x54d1de
mov eax, dword [ebx + 0x30]
test eax, eax
jle 0x54d1de
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 1
mov edx, dword [ebx + 0x34]
mov eax, dword [ebp - 0xc]
dec eax
mov edi, eax
shl edi, 2
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov edx, dword [ebx + 0x2c]
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.00409350
mov ecx, dword [ebp - 0x1c]
mov edx, dword [esi]
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
call fcn.004092f8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x24], eax
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x54d141
cmp byte [ebx + 0x11], 0xa
jne 0x54d1eb
mov dword [ebx + 0x14], 0x3ff
cmp byte [ebx + 0x11], 0xc
jne 0x54d1f8
mov dword [ebx + 0x14], 0xfff
cmp byte [ebx + 0x11], 0xe
jne 0x54d205
mov dword [ebx + 0x14], 0x3fff
cmp byte [ebx + 0x11], 0x10
jne 0x54d212
mov dword [ebx + 0x14], 0xffff
mov eax, dword [ebx + 8]
imul dword [ebx + 4]
dec eax
test eax, eax
jl 0x54d261
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov edx, dword [esi]
mov eax, edi
add eax, eax
add edx, eax
movzx edx, word [edx]
cmp edx, dword [ebx + 0x18]
jle 0x54d241
mov edx, dword [esi]
mov ecx, edi
add ecx, ecx
add edx, ecx
movzx edx, word [edx]
mov dword [ebx + 0x18], edx
mov edx, dword [esi]
add edx, eax
movzx eax, word [edx]
cmp eax, dword [ebx + 0x1c]
jge 0x54d25b
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
movzx eax, word [eax]
mov dword [ebx + 0x1c], eax
inc edi
dec dword [ebp - 0x30]
jne 0x54d223
mov eax, dword [ebx + 8]
imul dword [ebx + 4]
dec eax
test eax, eax
jl 0x54d768
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
movzx eax, word [eax]
sub eax, dword [ebx + 0x1c]
mov dword [ebp - 0x38], eax
fild dword [ebp - 0x38]
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x1c]
mov dword [ebp - 0x3c], eax
fild dword [ebp - 0x3c]
fdivp st(1)
fmul dword [0x54d8e8]
call fcn.00402c24
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov byte [edx + edi], al
inc edi
dec dword [ebp - 0x30]
jne 0x54d276
jmp 0x54d768
xor eax, eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x18], eax
cmp byte [ebx + 0x11], 0xa
je 0x54d2d0
cmp byte [ebx + 0x11], 0xc
jne 0x54d522
cmp byte [ebx + 0x10], 0xc
jne 0x54d522
mov eax, dword [ebx + 0x30]
test eax, eax
jle 0x54d522
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 1
mov edx, dword [ebx + 0x34]
mov eax, dword [ebp - 0xc]
dec eax
mov edi, eax
shl edi, 2
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 0x1c]
call fcn.004027b8
mov dword [ebp - 0x2c], eax
mov edx, dword [ebx + 0x2c]
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.00409350
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
call fcn.004092f8
mov eax, dword [ebp - 0x1c]
dec eax
mov ecx, 9
cdq
idiv ecx
test eax, eax
jl 0x54d50e
inc eax
mov dword [ebp - 0x34], eax
xor edi, edi
lea eax, [edi + edi*8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx]
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 1]
mov byte [ebp - 0x26], al
mov al, byte [ebp - 0x26]
and al, 0xf0
and eax, 0xff
shr eax, 4
xor edx, edx
mov dl, byte [ebp - 0x25]
shl edx, 4
and eax, 0xff
add edx, eax
mov eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov al, byte [ebp - 0x26]
and al, 0xf
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dl, byte [edx + ecx + 2]
mov byte [ebp - 0x27], dl
and eax, 0xff
shl eax, 8
xor edx, edx
mov dl, byte [ebp - 0x27]
add eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 3]
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 4]
mov byte [ebp - 0x26], al
mov al, byte [ebp - 0x26]
and al, 0xf0
and eax, 0xff
shr eax, 4
xor edx, edx
mov dl, byte [ebp - 0x25]
shl edx, 4
and eax, 0xff
add edx, eax
mov eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov al, byte [ebp - 0x26]
and al, 0xf
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dl, byte [edx + ecx + 5]
mov byte [ebp - 0x27], dl
and eax, 0xff
shl eax, 8
xor edx, edx
mov dl, byte [ebp - 0x27]
add eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 6]
mov byte [ebp - 0x25], al
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x10]
mov al, byte [eax + edx + 7]
mov byte [ebp - 0x26], al
mov al, byte [ebp - 0x26]
and al, 0xf0
and eax, 0xff
shr eax, 4
xor edx, edx
mov dl, byte [ebp - 0x25]
shl edx, 4
and eax, 0xff
add edx, eax
mov eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
mov al, byte [ebp - 0x26]
and al, 0xf
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dl, byte [edx + ecx + 8]
mov byte [ebp - 0x27], dl
and eax, 0xff
shl eax, 8
xor edx, edx
mov dl, byte [ebp - 0x27]
add eax, edx
mov edx, dword [esi]
mov ecx, dword [ebp - 0x18]
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc dword [ebp - 0x18]
inc edi
dec dword [ebp - 0x34]
jne 0x54d39a
mov eax, dword [ebp - 0x2c]
call fcn.004027d8
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x54d2ef
cmp byte [ebx + 0x11], 8
jbe 0x54d5e8
cmp byte [ebx + 0x10], 0x10
jne 0x54d5e8
mov eax, dword [ebx + 0x30]
test eax, eax
jle 0x54d5e8
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 1
mov edx, dword [ebx + 0x34]
mov eax, dword [ebp - 0xc]
dec eax
mov edi, eax
shl edi, 2
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov edx, dword [ebx + 0x2c]
add edx, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
call fcn.00409350
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
mov ecx, 4
call fcn.004092f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
xor ecx, ecx
mov edx, dword [ebp - 0x20]
call fcn.00409350
mov ecx, dword [ebp - 0x1c]
mov edx, dword [esi]
add edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
call fcn.004092f8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x24], eax
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x54d54b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x10c1], 0
jne 0x54d62f
mov eax, dword [ebx + 8]
imul dword [ebx + 4]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0xd28]
imul edx
dec eax
test eax, eax
jl 0x54d62f
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
mov ax, word [eax]
xchg al, ah
mov edx, dword [esi]
mov ecx, edi
add ecx, ecx
add edx, ecx
mov word [edx], ax
inc edi
dec dword [ebp - 0x30]
jne 0x54d611
mov eax, dword [ebx + 8]
dec eax
test eax, eax
jl 0x54d6b5
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov eax, dword [ebx + 4]
dec eax
test eax, eax
jl 0x54d6af
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0xc], 0
mov edx, dword [esi]
mov eax, dword [ebx + 4]
imul eax, edi
add eax, dword [ebp - 0xc]
lea eax, [eax + eax*2]
mov ecx, eax
add ecx, 2
add ecx, ecx
add edx, ecx
movzx edx, word [edx]
mov dword [ebp - 0x14], edx
mov edx, dword [esi]
add eax, eax
add edx, eax
mov eax, dword [esi]
mov ecx, dword [ebx + 4]
imul ecx, edi
add ecx, dword [ebp - 0xc]
lea ecx, [ecx + ecx*2]
add ecx, 2
add ecx, ecx
add eax, ecx
mov dx, word [edx]
mov word [eax], dx
mov eax, dword [esi]
mov edx, dword [ebx + 4]
imul edx, edi
add edx, dword [ebp - 0xc]
lea edx, [edx + edx*2]
add edx, edx
add eax, edx
mov dx, word [ebp - 0x14]
mov word [eax], dx
inc dword [ebp - 0xc]
dec dword [ebp - 0x34]
jne 0x54d650
inc edi
dec dword [ebp - 0x30]
jne 0x54d63d
mov eax, dword [ebx + 4]
imul dword [ebx + 8]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0xd28]
imul edx
dec eax
test eax, eax
jl 0x54d710
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov edx, dword [esi]
mov eax, edi
add eax, eax
add edx, eax
movzx edx, word [edx]
cmp edx, dword [ebx + 0x18]
jle 0x54d6f0
mov edx, dword [esi]
mov ecx, edi
add ecx, ecx
add edx, ecx
movzx edx, word [edx]
mov dword [ebx + 0x18], edx
mov edx, dword [esi]
add edx, eax
movzx eax, word [edx]
cmp eax, dword [ebx + 0x1c]
jge 0x54d70a
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
movzx eax, word [eax]
mov dword [ebx + 0x1c], eax
inc edi
dec dword [ebp - 0x30]
jne 0x54d6d2
mov eax, dword [ebx + 4]
imul dword [ebx + 8]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 0xd28]
imul edx
dec eax
test eax, eax
jl 0x54d768
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
movzx eax, word [eax]
sub eax, dword [ebx + 0x1c]
mov dword [ebp - 0x38], eax
fild dword [ebp - 0x38]
mov eax, dword [ebx + 0x18]
sub eax, dword [ebx + 0x1c]
mov dword [ebp - 0x3c], eax
fild dword [ebp - 0x3c]
fdivp st(1)
fmul dword [0x54d8e8]
call fcn.00402c24
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov byte [edx + edi], al
inc edi
dec dword [ebp - 0x30]
jne 0x54d72d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3a0]
call fcn.00409394
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3bfc9a], 0
je 0x54d82e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
mov edx, dword [ebp - 4]
imul dword [edx + 0x48]
dec eax
test eax, eax
jl 0x54d82e
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xd28]
imul dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
movzx edx, byte [edx + eax + 2]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx + edx + 0x3bfc9b]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov byte [ecx + eax + 2], dl
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xd28]
imul dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
movzx edx, byte [edx + eax + 1]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx + edx + 0x3bfd9b]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov byte [ecx + eax + 1], dl
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xd28]
imul dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
movzx edx, byte [edx + eax]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx + edx + 0x3bfe9b]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov byte [ecx + eax], dl
inc dword [ebp - 0xc]
dec dword [ebp - 0x30]
jne 0x54d7a6
cmp byte [ebx + 0x11], 0xa
jne 0x54d83b
mov dword [ebx + 0x14], 0x3ff
cmp byte [ebx + 0x11], 0xc
jne 0x54d848
mov dword [ebx + 0x14], 0xfff
cmp byte [ebx + 0x11], 0xe
jne 0x54d855
mov dword [ebx + 0x14], 0x3fff
cmp byte [ebx + 0x11], 0x10
jne 0x54d862
mov dword [ebx + 0x14], 0xffff
mov eax, dword [ebx + 0x14]
inc eax
shl eax, 2
call fcn.004027b8
mov edx, dword [ebp - 4]
mov dword [edx + 0x192c], eax
mov edx, dword [ebx + 0x14]
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x192c]
call fcn.00407644
mov eax, dword [ebx + 4]
imul dword [ebx + 8]
dec eax
test eax, eax
jl 0x54d8c1
inc eax
mov dword [ebp - 0x30], eax
xor edi, edi
mov eax, dword [esi]
mov edx, edi
add edx, edx
add eax, edx
movzx eax, word [eax]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x192c]
mov edx, dword [ebp - 0x14]
shl edx, 2
add eax, edx
inc dword [eax]
inc edi
dec dword [ebp - 0x30]
jne 0x54d89a
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x54d8de
lea eax, [ebp - 8]
call fcn.004042c8
ret