Function at 0x47d9ae
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
push esi
push edi
xor ecx, ecx
push 3
pop esi
inc ecx
cmp eax, esi
je 0x47d9d8
cmp eax, 2
je 0x47d9d8
test eax, eax
je 0x47d9d8
and dword [ebp - 0x10], 0
jmp 0x47d9db
mov dword [ebp - 0x10], ecx
mov edx, dword [ebx + 0xc]
lea eax, [ebx + 0x35c]
inc dword [eax]
mov eax, dword [eax]
cmp eax, ecx
mov dword [ebp - 0xc], edx
mov edx, dword [ebx + 0x18]
mov dword [ebp - 8], edx
lea edi, [ebx + 0x254]
jne 0x47dbcb
xor edx, edx
cmp dword [ebp - 0x10], edx
je 0x47da1d
mov eax, dword [ebx + 4]
xor edi, edi
cmp eax, 2
je 0x47da14
cmp eax, edx
jne 0x47da24
cmp dword [ebp - 0xc], edx
je 0x47da24
mov edi, ecx
jmp 0x47da24
cmp dword [ebp - 0xc], edx
je 0x47da19
mov edi, esi
mov eax, dword [ebp + 0xc]
lea esi, [ebx + 0x34]
mov dword [ebx + 0x344], edi
mov dword [ebp + 0xc], edx
mov dword [ebp + 8], esi
movzx dx, byte [eax]
xor ecx, ecx
mov ch, byte [eax + 1]
or ecx, edx
cmp cx, 0xffff
mov edx, dword [ebp + 8]
mov word [edx], cx
je 0x47da68
add dword [ebp + 8], 2
inc eax
inc eax
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0xf
jl 0x47da36
mov eax, 0x300
pop edi
pop esi
pop ebx
leave
ret 0xc
and dword [ebx + 0xb9c], 0
cmp dword [ebx + 0x240], 0
je 0x47dacf
push dword [ebx + 0x240]
mov ecx, 0x6b882590
call fcn.0047ce73
cmp eax, 1
jne 0x47da95
mov dword [ebx + 0xb9c], eax
jmp 0x47dad5
push dword [ebx + 0x240]
mov ecx, 0x6b882598
call fcn.0047ce73
cmp eax, 1
jne 0x47da5c
mov eax, dword [ebx + 0x240]
add eax, 8
push eax
mov ecx, 0x6b8825a0
call fcn.0047ce73
cmp eax, 1
jne 0x47da5c
mov dword [ebx + 0xb9c], 2
jmp 0x47dad5
cmp dword [ebp - 8], 2
je 0x47da5c
mov eax, dword [ebp + 0xc]
or word [ebx + eax*2 + 0x34], 0xffff
test edi, edi
movsx eax, word [esi]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
je 0x47db96
mov eax, dword [ebx + 0x24]
lea ecx, [eax*4 + 0xef]
mov eax, 0xffff
cdq
idiv edi
shr ecx, 2
lea ecx, [ecx*4 + 4]
mov dword [ebp + 8], ecx
cmp ecx, eax
jbe 0x47db42
and dword [ebp + 0xc], 0
test edi, edi
jle 0x47db96
lea esi, [ebx + 0x260]
push 1
push dword [ebp + 8]
push esi
call fcn.0047cbc0
test eax, eax
mov dword [ebp - 4], eax
jne 0x47de8e
inc dword [ebp + 0xc]
add esi, 0xc
cmp dword [ebp + 0xc], edi
jl 0x47db1f
jmp 0x47db96
mov eax, dword [ebp + 8]
imul eax, edi
push 1
push eax
lea eax, [ebx + 0x260]
push eax
call fcn.0047cbc0
mov esi, eax
test esi, esi
je 0x47db68
push ebx
call fcn.0047cc4b
jmp 0x47e137
cmp edi, 1
jle 0x47db96
lea ecx, [ebx + 0x264]
lea eax, [ebx + 0x274]
lea edx, [edi - 1]
mov esi, dword [ecx]
add esi, dword [ebp + 8]
and dword [eax], 0
mov dword [eax - 4], esi
mov esi, dword [ebp + 8]
mov dword [eax - 8], esi
add eax, 0xc
add ecx, 0xc
dec edx
jne 0x47db7c
push 3
pop ecx
cmp edi, ecx
jge 0x47dbbc
lea edx, [edi + edi*2]
lea eax, [ebx + 0x254]
lea eax, [eax + edx*4 + 0x14]
sub ecx, edi
xor edx, edx
mov dword [eax - 4], edx
mov dword [eax], edx
mov dword [eax - 8], edx
add eax, 0xc
dec ecx
jne 0x47dbae
mov eax, ebx
call fcn.0047d7d5
mov dword [ebp - 4], eax
jmp 0x47e0ec
cmp eax, 2
jne 0x47ddca
mov ecx, dword [ebx + 0x10]
cmp ecx, 0xb40
mov eax, 0x2d0
jne 0x47dbef
cmp dword [ebx + 0x14], eax
jne 0x47dbef
movsx eax, word [ebx + 0x3e]
jmp 0x47dc22
cmp ecx, 0x5a0
jne 0x47dc02
cmp dword [ebx + 0x14], eax
jne 0x47dc02
movsx eax, word [ebx + 0x3a]
jmp 0x47dc22
mov eax, dword [ebx + 0x14]
lea esi, [eax + eax]
cmp ecx, esi
jne 0x47dc12
movsx eax, word [ebx + 0x38]
jmp 0x47dc22
add ecx, ecx
cmp ecx, eax
jne 0x47dc1e
movsx eax, word [ebx + 0x3c]
jmp 0x47dc22
movsx eax, word [ebx + 0x36]
cmp eax, 0xffffffff
je 0x47da5c
cmp dword [ebp - 0xc], 0
mov ecx, dword [ebp + 0x10]
lea esi, [ebx + 0x54]
mov dword [ecx], eax
mov dword [ebp + 0x10], esi
jne 0x47dcc3
cmp dword [ebx + 0xb9c], 2
jne 0x47dc9d
cmp edx, 2
jne 0x47dc9d
lea eax, [esi + 0xd4]
lea esi, [ebp + 0x10]
mov dword [ebp + 0xc], eax
call fcn.0047d852
test eax, eax
jne 0x47da61
mov ebx, dword [ebp + 0x10]
push eax
lea eax, [ebx + ebx + 0x201]
shr eax, 2
lea eax, [eax*4 + 4]
push eax
push edi
call fcn.0047cbc0
test eax, eax
jne 0x47da61
mov ecx, dword [edi + 4]
mov esi, dword [ebp + 0xc]
mov eax, ebx
call fcn.0047d8a1
jmp 0x47e0ec
push 0
push 0x200
push edi
call fcn.0047cbc0
test eax, eax
jne 0x47dd8b
push eax
push esi
push dword [edi + 4]
call 0x488935
fstp st(0)
jmp 0x47e0ec
mov edx, dword [ebp + 0x10]
xor eax, eax
cmp dword [edx + 0x1d8], eax
mov ecx, 0x80
mov esi, edx
lea edi, [ebp - 0x21c]
rep movsd dword es:[edi], dword [esi]
je 0x47ddc0
cmp dword [edx + 0x1d4], eax
je 0x47ddc0
cmp dword [ebx], eax
jne 0x47dd25
mov eax, dword [edx + 8]
and byte [edx + 0x8c], 0
and byte [edx + 0x68], 0
and byte [edx + 0x44], 0
or byte [edx + 0x8d], 0xff
or byte [edx + 0x69], 0xff
push 2
pop ecx
shl eax, 3
or byte [edx + 0x45], 0xff
mov dword [edx + 0x3c], ecx
mov dword [edx + 0x38], ecx
mov dword [edx + 0x34], ecx
jmp 0x47dd6c
mov edi, dword [ebp + 0xc]
xor eax, eax
mov ah, byte [edi + 1]
push 0x20
pop ecx
mov al, byte [edi]
mov esi, eax
cmp esi, ecx
je 0x47dd42
mov esi, 0x202
jmp 0x47db5d
mov eax, dword [edx + 8]
imul eax, esi
imul eax, esi
imul eax, esi
mov dword [edx + 0x3c], esi
mov dword [edx + 0x38], ecx
mov dword [edx + 0x34], ecx
lea esi, [edx + 0x68]
add edi, 2
mov dl, byte [edi]
inc edi
mov byte [esi + 0x24], dl
mov byte [esi], dl
mov byte [esi - 0x24], dl
inc esi
dec ecx
jne 0x47dd5d
xor edi, edi
dec eax
shr eax, 2
push edi
lea eax, [eax*4 + 4]
push eax
lea esi, [ebx + 0x254]
push esi
call fcn.0047cbc0
cmp eax, edi
je 0x47dd92
mov esi, eax
jmp 0x47db5d
cmp dword [ebp - 0x10], edi
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x1d8], edi
mov ecx, dword [esi + 4]
mov dword [eax + 0x1d4], ecx
jne 0x47ddad
push 2
jmp 0x47ddae
push edi
push eax
lea eax, [ebp - 0x21c]
push eax
call 0x488eab
jmp 0x47e0ec
mov esi, 0x201
jmp 0x47db5d
cmp eax, esi
jne 0x47e0f3
mov eax, dword [ebp + 0x10]
or dword [eax], 0xffffffff
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax]
cmp ecx, 0xff
mov dword [ebx + 0x368], ecx
movzx eax, byte [eax + 1]
mov dword [ebx + 0x36c], eax
mov eax, pe_nt_image_headers32
jne 0x47de01
mov dword [ebx + 0x368], eax
cmp dword [ebx + 0x36c], 0xff
jne 0x47de13
mov dword [ebx + 0x36c], eax
mov eax, 0xef
cmp dword [ebx + 0x368], eax
mov ecx, 0x200
jne 0x47de2b
mov dword [ebx + 0x368], ecx
cmp dword [ebx + 0x36c], eax
jne 0x47de39
mov dword [ebx + 0x36c], ecx
mov eax, dword [ebx + 0x368]
imul eax, dword [ebx + 0x36c]
mov dword [ebx + 0x370], eax
lea eax, [eax*4 - 1]
shr eax, 2
cmp dword [ebp - 0x10], 0
lea eax, [eax*4 + 4]
mov dword [ebp + 8], eax
je 0x47de71
cmp dword [ebp - 0xc], 0
mov esi, 0x800
je 0x47de76
mov esi, 0x400
add dword [ebp + 8], esi
push 0
push dword [ebp + 8]
lea eax, [edi + 0x30]
push eax
call fcn.0047cbc0
test eax, eax
mov dword [ebp - 4], eax
je 0x47de9c
push ebx
call fcn.0047cc4b
mov eax, dword [ebp - 4]
jmp 0x47da61
mov eax, dword [edi + 0x34]
sub eax, esi
add eax, dword [ebp + 8]
xor edx, edx
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], edx
mov dword [edi + 0x3c], esi
mov edi, dword [edi + 0x34]
xor eax, eax
cmp dword [ebx + 0x370], edx
jbe 0x47ded5
mov esi, dword [ebp + 0xc]
xor ecx, ecx
mov ch, byte [esi + eax*2 + 5]
mov cl, byte [esi + eax*2 + 4]
mov dword [edi + eax*4], ecx
inc eax
cmp eax, dword [ebx + 0x370]
jb 0x47debf
cmp dword [ebp - 0xc], edx
mov ecx, 0x800
mov eax, ecx
jne 0x47def0
cmp dword [ebp - 8], 2
jne 0x47def0
mov dword [ebp + 8], 1
jmp 0x47defb
push 2
pop edx
cmp dword [ebp - 8], edx
mov dword [ebp + 8], edx
jne 0x47df03
mov eax, dword [ebp + 8]
shl eax, 0xc
add eax, ecx
push 1
push eax
lea esi, [ebx + 0x254]
lea eax, [esi + 0x48]
push eax
call fcn.0047cbc0
mov edi, eax
xor edx, edx
cmp edi, edx
je 0x47df2a
push ebx
call fcn.0047cc4b
mov eax, edi
jmp 0x47da61
mov ecx, dword [esi + 0x4c]
mov eax, 0x200
add ecx, eax
mov dword [esi + 0x58], ecx
mov edi, ecx
mov ecx, 0x400
mov dword [esi + 0x5c], edx
mov dword [esi + 0x54], eax
add edi, ecx
cmp dword [ebp - 8], 2
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edx
mov dword [esi + 0x60], ecx
jne 0x47df62
mov ecx, edi
add ecx, eax
mov dword [esi + 0x70], ecx
mov dword [esi + 0x74], edx
mov dword [esi + 0x6c], eax
mov eax, dword [ebx + 0x2a0]
mov esi, dword [ebx + 0x2b8]
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2ac]
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x18], eax
mov dword [ebp + 0xc], edi
lea eax, [ecx + ebx + 0x98]
movzx edx, byte [eax]
cmp edx, edi
jne 0x47df9a
or byte [esi + edi*2 + 1], 0xff
mov byte [esi + edi*2], cl
inc ecx
jmp 0x47dfce
jle 0x47dfce
mov dl, cl
dec dl
mov byte [esi + edi*2], dl
movzx eax, byte [eax]
movzx edx, byte [ecx + ebx + 0x97]
mov dword [ebp - 0x14], eax
sub eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
sub eax, edi
mov edi, dword [ebp - 0x1c]
imul eax, eax, 0xff
cdq
idiv edi
mov edi, dword [ebp + 0xc]
mov byte [esi + edi*2 + 1], al
inc edi
cmp edi, 0x100
mov dword [ebp + 0xc], edi
jl 0x47df81
mov edi, dword [ebp - 0xc]
lea esi, [ebx + 0x374]
push esi
push dword [ebx + 0xb9c]
lea esi, [ebx + 0x54]
push dword [esi + 0x20]
lea eax, [ebx + 0x380]
push dword [ebx + 0x14]
lea ecx, [ebx + 0x37c]
push dword [ebx + 0x10]
lea edx, [ebx + 0x378]
push edi
push dword [ebp - 8]
call fcn.0047cf86
test eax, eax
jne 0x47da61
mov edx, dword [ebp - 4]
push edi
push dword [ebp - 8]
mov ecx, esi
call fcn.0047ce9c
push dword [ebx + 0x258]
mov ecx, dword [ebx + 0x294]
push dword [ebp - 4]
mov eax, dword [ebx + 0x370]
push dword [ebx + 0x10]
push edi
push dword [ebp - 0x10]
call fcn.0047cf0e
mov eax, dword [ebx + 0xb9c]
cmp eax, 1
jne 0x47e078
mov eax, dword [ebx + 0x2c4]
mov ecx, dword [ebp + 8]
shl ecx, 0xb
add ecx, eax
push ecx
push eax
push dword [ebp + 0x10]
push dword [ebp - 4]
push ebx
push dword [ebp + 8]
push dword [ebp - 8]
push edi
call 0x4887b5
jmp 0x47e0b3
cmp eax, 2
jne 0x47e0b3
test edi, edi
mov esi, dword [esi + 0x1ec]
jne 0x47e0a0
xor eax, eax
mov ah, byte [esi + 5]
mov al, byte [esi + 4]
cmp ax, 2
jne 0x47e0a0
movzx ecx, byte [esi + 0x12]
xor eax, eax
mov ah, byte [esi + 0x13]
jmp 0x47e0a9
movzx ecx, byte [esi + 0x10]
xor eax, eax
mov ah, byte [esi + 0x11]
movsx eax, ax
or eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
push esi
push dword [ebx + 0x14]
push dword [ebx + 0x10]
push edi
push dword [ebp - 8]
call fcn.0047d2ad
cmp edi, 3
jne 0x47e0ec
xor ecx, ecx
movsx eax, word [esi + ecx*2]
imul eax, eax, 0x64
cdq
mov edi, 0xc8
idiv edi
mov word [esi + ecx*2], ax
inc ecx
cmp ecx, 0x100
jl 0x47e0d0
xor eax, eax
jmp 0x47da61
cmp eax, 4
jne 0x47da5c
mov eax, dword [ebp + 0x10]
or dword [eax], 0xffffffff
cmp dword [ebp - 0xc], 0
mov edi, dword [edi + 0x70]
mov ecx, dword [ebp + 0xc]
jne 0x47e129
mov eax, edi
call fcn.0047d741
push dword [ebx + 0x10]
mov ecx, dword [ebx + 0x2ac]
mov esi, eax
mov eax, edi
call fcn.0047d936
jmp 0x47e137
lea eax, [edi + 0x1000]
push edi
call fcn.0047d5d4
mov esi, eax
mov eax, esi
jmp 0x47da61