Function at 0x405770
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x418410
push 0x40c080
mov eax, dword fs:[0]
push eax
add esp, 0xffffffbc
push ebx
push esi
push edi
mov eax, dword [0x41a084]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
cmp dword [ebp + 8], 0
je 0x4057af
cmp dword [ebp + 0x10], 0
jne 0x4057b6
xor eax, eax
jmp 0x4059a2
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0xfffffff9
jne 0x4057fa
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 2
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x2c]
mov ax, word [edx]
mov word [ebp - 0x32], ax
add dword [ebp - 0x2c], 2
cmp word [ebp - 0x32], 0
jne 0x4057d2
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x30]
sar ecx, 1
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x20], edx
jmp 0x405800
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
add edx, 2
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x3c]
mov cx, word [eax]
mov word [ebp - 0x42], cx
add dword [ebp - 0x3c], 2
cmp word [ebp - 0x42], 0
jne 0x40580f
mov edx, dword [ebp - 0x3c]
sub edx, dword [ebp - 0x40]
sar edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x24]
jae 0x405853
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x4c]
jmp 0x4059a2
mov dword [ebp - 0x1c], 0
jmp 0x405865
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x24]
cmp dword [ebp - 0x1c], eax
ja 0x405974
mov dword [ebp - 0x28], 0
jmp 0x405886
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x24]
jae 0x40594f
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + eax*2]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x10]
movzx eax, word [ecx + eax*2]
cmp edx, eax
je 0x40594a
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx*2]
cmp eax, 0x41
jl 0x4058fb
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx*2]
cmp eax, 0x5a
jg 0x4058fb
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0x10]
movzx ecx, word [edx + ecx*2]
sub ecx, 0x20
cmp eax, ecx
jne 0x4058f7
jmp 0x40587d
jmp 0x40594f
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
cmp ecx, 0x61
jl 0x405948
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
cmp ecx, 0x7a
jg 0x405948
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x10]
movzx edx, word [eax + edx*2]
add edx, 0x20
cmp ecx, edx
jne 0x405944
jmp 0x40587d
jmp 0x40594f
jmp 0x40594f
jmp 0x40587d
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x24]
jne 0x40596f
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x50], eax
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x50]
jmp 0x4059a2
jmp 0x40585c
mov dword [ebp - 4], 0xfffffffe
jmp 0x4059a0
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret