Function at 0x471080
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x58e710]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
cmp eax, ebx
je 0x4710da
push eax
call fcn.004ed300
mov esi, eax
add esp, 4
mov dword [ebp - 0x34], esi
cmp esi, ebx
je 0x4710da
push ebx
mov edi, 8
push edi
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.004ed560
push edi
lea ecx, [ebp - 0xc]
push ebx
push ecx
call fcn.00512370
add esp, 0x1c
test eax, eax
je 0x4710f0
push esi
call fcn.004ed460
add esp, 4
xor eax, eax
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret
push ebx
push ebx
push esi
call fcn.004ed4f0
push ebx
push ebx
push ebx
push 0x561710
call fcn.00516060
add esp, 0x1c
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x4710d1
push eax
call fcn.00512870
add esp, 4
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x471149
push ebx
lea edx, [ebp - 0x10]
push ebx
push edx
call fcn.005171b0
push esi
call fcn.004ed460
add esp, 0x10
xor eax, eax
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
push 0x471060
push esi
push eax
call fcn.0051fd80
mov ecx, dword [ebp - 0x10]
push 0x40
push fcn.004f551c
push ecx
mov dword [ebp - 0x28], ebx
call fcn.0051fa80
push ebx
push eax
call fcn.004f565c
add esp, 0x20
test eax, eax
je 0x4711bc
push ebx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x10]
push eax
call fcn.005171b0
mov eax, dword [ebp - 0x28]
add esp, 0xc
cmp eax, ebx
je 0x47119a
push eax
call fcn.00465940
add esp, 4
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.004ed460
add esp, 4
xor eax, eax
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
push edx
push eax
call fcn.00516120
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x40]
push edx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x3c]
push ecx
push edx
push eax
call fcn.0051f010
add esp, 0x2c
test eax, eax
jne 0x47122d
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push ecx
push edx
call fcn.00516d80
push ebx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
push ecx
call fcn.005171b0
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jne 0x471240
mov edx, dword [ebp - 0x10]
push edx
call fcn.00517470
jmp 0x471253
cmp eax, 2
je 0x47124a
cmp eax, 4
jne 0x471259
mov eax, dword [ebp - 0x10]
push eax
call fcn.0051e5e0
mov dword [ebp - 0x20], edi
add esp, 4
mov eax, dword [ebp - 0x18]
cmp eax, 3
jne 0x471362
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push 0x10
push ecx
push edx
call fcn.0051eff0
add esp, 0xc
test eax, eax
je 0x471299
mov eax, dword [ebp - 0x10]
push eax
call fcn.005174a0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005174a0
add esp, 8
mov dword [ebp - 0x18], 6
jmp 0x4712f7
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x30]
push eax
push ecx
push edx
call fcn.0051f0f0
mov eax, dword [ebp - 0x20]
add esp, 0x10
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
cmp eax, 2
jne 0x4712f2
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push 0x10
push ecx
push edx
call fcn.0051eff0
add esp, 0xc
test eax, eax
jne 0x4713c0
mov eax, dword [ebp - 0x10]
push eax
mov dword [ebp - 0x24], 0x18
mov dword [ebp - 0x1c], ebx
call fcn.0051e5c0
mov eax, dword [ebp - 0x18]
add esp, 4
cmp eax, 6
jne 0x47130d
mov edx, dword [ebp - 0x10]
push edx
mov dword [ebp - 0x24], 0x20
mov dword [ebp - 0x1c], ebx
call fcn.0051e5c0
add esp, 4
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x3c]
push eax
push ecx
push edx
call fcn.004660d0
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x28], ebx
test ebx, ebx
jne 0x4713d8
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call fcn.00516d80
push ebx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x10]
push eax
call fcn.005171b0
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret
cmp eax, ebx
jne 0x47139f
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push 0x10
push ecx
push edx
call fcn.0051eff0
add esp, 0xc
test eax, eax
je 0x47138a
mov eax, dword [ebp - 0x10]
push eax
call fcn.00517500
jmp 0x471284
mov ecx, dword [ebp - 0x20]
mov edx, 1
shl edx, cl
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], edx
jmp 0x4712b7
cmp eax, 4
jne 0x4712ba
mov eax, dword [ebp - 0x10]
push eax
call fcn.00517500
add esp, 4
mov dword [ebp - 0x18], 6
jmp 0x4712f7
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005174a0
add esp, 4
mov dword [ebp - 0x18], 6
jmp 0x4712f7
mov eax, dword [ebp - 0x18]
cmp eax, 3
jne 0x471421
mov eax, dword [ebx]
xor esi, esi
add eax, 0x28
cmp dword [ebp - 0x1c], esi
jle 0x471461
xor ecx, ecx
inc eax
nop
mov edx, dword [ebp - 0x30]
movzx edx, byte [ecx + edx]
mov byte [eax + 1], dl
mov edx, dword [ebp - 0x30]
movzx edx, byte [ecx + edx + 1]
mov byte [eax], dl
mov edx, dword [ebp - 0x30]
movzx edx, byte [ecx + edx + 2]
mov byte [eax - 1], dl
mov byte [eax + 2], 0
inc esi
add ecx, 3
add eax, 4
cmp esi, dword [ebp - 0x1c]
jl 0x4713f0
jmp 0x471461
test eax, eax
jne 0x471461
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x1c]
add ecx, 0x28
xor edi, edi
test eax, eax
jle 0x471461
xor esi, esi
add ecx, 2
lea ebx, [eax - 1]
mov eax, esi
cdq
idiv ebx
mov byte [ecx + 1], 0
inc edi
add esi, 0xff
add ecx, 4
mov byte [ecx - 6], al
mov byte [ecx - 5], al
mov byte [ecx - 4], al
mov eax, dword [ebp - 0x1c]
cmp edi, eax
jl 0x471438
mov ebx, dword [ebp - 0x28]
push 0
push 0
push ebx
call fcn.0041c660
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebx + 0xc]
mov dword [ebp - 0x38], eax
add esp, 0xc
lea eax, [edi*4]
neg esi
call fcn.004f8120
xor eax, eax
mov edx, esp
test edi, edi
jbe 0x47149b
mov ecx, dword [ebp - 0x38]
mov dword [edx + eax*4], ecx
inc eax
add ecx, esi
cmp eax, dword [ebp - 0x2c]
jb 0x471490
mov eax, dword [ebp - 0x10]
push edx
push eax
call fcn.00516c90
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push ecx
push edx
call fcn.00516d80
push 0
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
push ecx
call fcn.005171b0
mov edx, dword [ebp - 0x34]
push edx
call fcn.004ed460
add esp, 0x20
mov eax, ebx
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3f55
mov esp, ebp
pop ebp
ret