Function at 0x437330
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 0x4375ce
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
mov dword [esp + 0x14], esi
jmp 0x4373c9
mov esi, ebx
mov ebx, edi
mov eax, dword [esp + 8]
sub edi, eax
mov ecx, edi
sar ecx, 2
mov dword [esp + 4], ebx
cmp ebx, dword [esp + 0x10]
je 0x437419
mov edi, dword [esp + 4]
mov ebx, esi
mov esi, dword [esp + 0x14]
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 0x4375ce
test edx, edx
je 0x4373d2
cmp byte [edx], 0x3f
je 0x4373de
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x40]
cmp cl, byte [eax]
jne 0x4373be
cmp dword [esp + 0x44], 2
jb 0x437390
xor ecx, ecx
jmp 0x43740c
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x40]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x48]
jne 0x4374e4
inc ecx
cmp esi, ecx
je 0x437390
test edx, edx
je 0x4373f0
cmp byte [edx + ecx + 1], 0x3f
jne 0x4373f0
jmp 0x437407
mov dword [esp + 0xc], edi
lea edx, [ecx + 1]
mov eax, ecx
shr eax, 1
mov dword [esp + 0x18], ecx
add eax, ecx
cmp eax, edx
ja 0x437430
mov eax, edx
mov ebx, eax
and ebx, 0xfffffffb
mov ecx, eax
and ecx, 4
mov dword [esp + 0x10], eax
or eax, 4
imul eax, ecx
xor ecx, 4
imul ecx, ebx
add eax, ecx
push eax
call fcn.00409230
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 4]
mov dword [esp], eax
mov esi, dword [esp + 0x14]
je 0x4375a4
cmp eax, edx
jbe 0x4374eb
cmp edi, eax
jbe 0x4374eb
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x437591
lea ecx, [ebx - 0x2102e4a7]
mov eax, dword [esp + 8]
add eax, ecx
add eax, 0x2102e4a6
mov edx, dword [esp]
add ecx, edx
add ecx, 0x2102e4a6
mov edx, dword [esp + 8]
not edx
add edx, edi
and ebx, 7
je 0x437533
mov dword [esp + 4], edx
neg ebx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x4374c0
add ecx, edi
mov ebx, dword [esp + 0xc]
add ebx, edi
add eax, edi
mov edx, dword [esp + 4]
cmp edx, 7
jae 0x43753c
jmp 0x437591
add ebp, ecx
jmp 0x4373be
mov ebx, dword [esp + 0xc]
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov edi, dword [esp]
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov edx, ebx
and edx, 0xfffffffc
mov ecx, dword [esp]
lea edi, [ecx + edx]
add edx, eax
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov eax, edx
mov dword [esp + 4], edi
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
test bl, 1
je 0x437591
and ebx, 2
movzx eax, byte [edx + ebx]
mov ecx, dword [esp + 4]
mov byte [ecx + ebx], al
jmp 0x437591
mov ebx, dword [esp + 0xc]
cmp edx, 7
jb 0x437591
neg ebx
xor edx, edx
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 0x437540
push dword [esp + 8]
call fcn.00409240
add esp, 4
mov ebx, dword [esp + 0x34]
mov eax, dword [esp]
mov dword [ebx], eax
mov ecx, dword [esp + 0x18]
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x10]
mov edx, dword [esp]
lea edx, [edx + eax*4]
mov eax, dword [esp]
mov dword [esp + 0x10], edx
mov dword [ebx + 8], edx
mov dword [esp + 8], eax
mov edx, dword [esp + 0x48]
jmp 0x4373b3
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret