Function at 0x10004250
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x10046c38
push 0x10017df0
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x1004a0d4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edx, ecx
mov dword [ebp - 0x43c], edx
lea eax, [edx + 0x3c]
mov dword [ebp - 0x450], eax
cmp byte [eax], 0
jne 0x10004540
mov ebx, dword [edx + 0x40]
mov dword [ebp - 0x434], ebx
test ebx, ebx
jne 0x100042bd
cmp dword [edx + 0x44], ebx
je 0x10004540
test ebx, ebx
je 0x100042ce
mov esi, dword [edx + 0x44]
mov dword [ebp - 0x42c], esi
test esi, esi
jne 0x10004370
xor esi, esi
mov dword [ebp - 0x42c], esi
mov edi, dword [ebx + 0x3c]
add edi, ebx
movzx eax, word [edi + 6]
xor ecx, ecx
test eax, eax
je 0x1000436a
mov edx, dword [edi + 0x74]
dec eax
mov dword [ebp - 0x438], eax
xor eax, eax
mov dword [ebp - 0x428], eax
nop dword [eax + eax]
add edx, eax
mov eax, dword [edi + edx*8 + 0x88]
test eax, eax
jne 0x10004314
mov eax, dword [edi + edx*8 + 0x80]
test dword [edi + edx*8 + 0x9c], 0x20000000
je 0x1000432c
mov esi, dword [edi + edx*8 + 0x84]
add esi, ebx
add esi, eax
cmp ecx, dword [ebp - 0x438]
jne 0x10004343
test esi, esi
jne 0x10004343
mov esi, dword [edi + edx*8 + 0x8c]
add esi, ebx
add esi, eax
inc ecx
mov eax, dword [ebp - 0x428]
add eax, 5
mov dword [ebp - 0x428], eax
movzx edx, word [edi + 6]
cmp ecx, edx
mov edx, dword [edi + 0x74]
jl 0x10004300
mov dword [ebp - 0x42c], esi
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x434], ebx
mov dword [ebp - 0x428], edx
cmp dword [edx + 0x14], 0x10
jb 0x10004384
mov eax, dword [edx]
mov dword [ebp - 0x428], eax
lea ecx, [edx + 0x18]
mov dword [ebp - 0x438], ecx
cmp dword [ecx + 0x14], 0x10
jb 0x1000439b
mov eax, dword [ecx]
mov dword [ebp - 0x438], eax
mov eax, dword [ebp - 0x43c]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x430], eax
mov eax, dword [ecx + 0x10]
jb 0x100043b1
mov ecx, dword [ecx]
or edi, 0xffffffff
test eax, eax
je 0x100043d5
dec eax
mov edx, edi
cmp eax, edi
cmovb edx, eax
add edx, ecx
cmp byte [edx], 0xff
jne 0x100043d1
cmp edx, ecx
je 0x100043d5
dec edx
cmp byte [edx], 0xff
je 0x100043c7
sub edx, ecx
jmp 0x100043d8
or edx, 0xffffffff
cmp edx, 0xffffffff
cmove edx, edi
mov dword [ebp - 0x444], edx
mov dword [ebp - 0x448], 0
lea eax, [ebp - 0x444]
lea ecx, [ebp - 0x448]
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x10004418
push 0x400
push 0
lea eax, [ebp - 0x424]
push eax
call fcn.10018160
add esp, 0xc
jmp 0x10004427
mov ecx, 0x100
mov eax, edx
lea edi, [ebp - 0x424]
rep stosd dword es:[edi], eax
xor edi, edi
mov eax, dword [ebp - 0x430]
test eax, eax
jle 0x1000446d
mov ebx, dword [ebp - 0x428]
mov esi, eax
nop dword [eax + eax]
movzx eax, byte [ebx + edi]
lea edx, [ebp - 0x424]
lea edx, [edx + eax*4]
mov eax, edi
cmp dword [edx], edi
cmovge eax, dword [edx]
mov dword [edx], eax
inc edi
cmp edi, esi
jl 0x10004440
mov ebx, dword [ebp - 0x434]
mov esi, dword [ebp - 0x42c]
mov eax, dword [ebp - 0x430]
mov dword [ebp - 4], 0
sub esi, eax
mov dword [ebp - 0x42c], esi
mov edi, dword [ebp - 0x428]
mov dword [ebp - 0x440], ebx
cmp ebx, esi
ja 0x10004530
mov dword [ebp - 0x434], ebx
mov edx, dword [ebp - 0x438]
dec eax
mov dword [ebp - 0x44c], eax
test eax, eax
js 0x100044b6
mov cl, byte [eax + ebx]
and cl, byte [eax + edx]
cmp byte [eax + edi], cl
je 0x1000449c
test eax, eax
jns 0x100044e8
mov esi, dword [ebp - 0x43c]
lea eax, [ebp - 0x434]
push eax
lea ecx, [esi + 0x30]
call fcn.10004560
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x30]
sar eax, 2
cmp eax, dword [ebp + 8]
je 0x10004530
inc ebx
mov esi, dword [ebp - 0x42c]
mov eax, dword [ebp - 0x430]
jmp 0x10004482
movzx ecx, byte [eax + ebx]
sub eax, dword [ebp + ecx*4 - 0x424]
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x454], 1
mov ecx, 1
cmp eax, ecx
cmovg ecx, eax
add ebx, ecx
mov eax, dword [ebp - 0x430]
jmp 0x10004482
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x450]
mov byte [eax], 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.1001641e
mov esp, ebp
pop ebp
ret 4