Function at 0x437870
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add eax, ebp
sub eax, dword [esp + 0x44]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x1c], eax
cmp eax, ebp
jbe 0x437b11
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
jmp 0x437903
mov ebx, dword [esp]
mov edi, ebx
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
cmp ebx, dword [esp + 0x10]
je 0x437959
mov ebx, dword [esp + 0x34]
mov edi, dword [esp]
mov dword [eax + ecx*4], ebp
add edi, 4
mov dword [ebx + 4], edi
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x1c]
jae 0x437b11
test edx, edx
je 0x43790c
cmp byte [edx], 0x3f
je 0x437918
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x40]
cmp cl, byte [eax]
jne 0x4378f8
mov dword [esp], edi
cmp dword [esp + 0x44], 2
jb 0x4378d0
xor ecx, ecx
jmp 0x43794c
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x40]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x48]
jne 0x437a03
inc ecx
cmp esi, ecx
je 0x4378d0
test edx, edx
je 0x437930
cmp byte [edx + ecx + 1], 0x3f
jne 0x437930
jmp 0x437947
mov dword [esp + 4], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x18], ecx
add edx, ecx
cmp edx, eax
ja 0x437970
mov edx, eax
mov dword [esp + 0x10], edx
lea eax, [edx*4]
push eax
call fcn.00408f80
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0xc], eax
je 0x437ae5
cmp eax, edx
mov ecx, dword [esp + 4]
mov ebx, eax
jbe 0x437a0d
lea eax, [edx + ecx]
cmp eax, ebx
jbe 0x437a0d
test ecx, ecx
je 0x437ad1
mov edx, dword [esp + 8]
lea eax, [edx + ecx]
dec eax
mov ebx, ecx
mov ecx, dword [esp + 0xc]
add ecx, ebx
dec ecx
not edx
add edx, dword [esp]
and ebx, 7
je 0x437a70
mov dword [esp], edx
neg ebx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x4379e0
add eax, edi
mov ebx, dword [esp + 4]
add ebx, edi
add ecx, edi
mov edx, dword [esp]
cmp edx, 7
jae 0x437a79
jmp 0x437ad1
add ebp, ecx
mov edi, dword [esp]
jmp 0x4378f8
mov ecx, dword [esp + 4]
shr ecx, 2
mov eax, edx
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov edx, dword [esp + 4]
and edx, 0xfffffffc
add ebx, edx
add edx, eax
mov eax, dword [esp + 4]
and eax, 3
mov ecx, eax
shr ecx, 1
mov edi, edx
mov dword [esp], edx
mov dword [esp + 0x14], ebx
mov edi, ebx
mov ebx, dword [esp]
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ecx, dword [esp + 4]
test cl, 1
je 0x437ad1
mov edi, ecx
and ecx, 2
xor eax, 1
or edi, 2
and edi, eax
movzx eax, byte [edx + ecx]
mov ecx, dword [esp + 0x14]
mov byte [ecx + edi], al
jmp 0x437ad1
mov ebx, dword [esp + 4]
cmp edx, 7
jb 0x437ad1
neg ebx
xor edx, edx
nop
nop
nop
mov edi, ebx
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
mov ebx, edi
add edx, 0xfffffff8
cmp edi, edx
jne 0x437a80
push dword [esp + 8]
call fcn.00408f90
add esp, 4
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0xc]
mov dword [ebx], eax
mov ecx, dword [esp + 0x18]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea edx, [edx + eax*4]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], edx
mov dword [ebx + 8], edx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x48]
jmp 0x4378ed
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret