Function at 0xba56c3
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [0x412b1c]
mov edx, dword [esp + 0x70]
mov dword [esp + 0x1c], 0x409210
add eax, 0x1ff
shr eax, 9
mov dword [esp + 0x2c], eax
add eax, 2
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
or eax, 0xffffffff
cmp dword [esp + 0x74], ecx
jl 0xba59a0
mov eax, 0x409210
jmp 0xba5709
add eax, 4
cmp dword [eax], 0x3eb202fe
jne 0xba5706
movzx esi, word [eax + 0x16]
mov ecx, dword [edx]
mov dword [esp + 0x1c], eax
mov ebx, esi
add ebx, 0x409210
movzx eax, word [ebx + 0xe]
cmp dword [esp + 0x7c], 0
mov dword [esp + 0x44], esi
mov dword [eax + 0x410e3c], ecx
movzx eax, word [ebx + 0x10]
mov ecx, dword [edx + 4]
mov dword [eax + 0x410e3c], ecx
je 0xba5752
movzx eax, word [ebx + 0x12]
mov word [eax + 0x410e3c], 0x18cd
mov edi, dword [0x412b1c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
shr edi, 2
mov dword [ecx + 0xc], edi
sub eax, 2
cmp dword [esp + 0x78], 0
mov dword [esp + 0x28], edi
mov word [ecx + 8], ax
mov word [ecx + 0xa], 2
je 0xba5784
mov word [ecx + 0x14], 1
movzx ecx, word [ebx + 0xc]
cmp dword [esp + 0x30], ecx
mov si, word [ebx + 0xa]
jle 0xba579f
mov dword [esp + 4], 0x412cc8
jmp 0xba58fe
imul ecx, ecx, 0xa
movzx esi, si
lea edi, [edx + 8]
add esi, 0x409210
mov dword [esp + 0x40], edi
xor eax, eax
mov edi, esi
xor ebp, ebp
rep stosb byte es:[edi], al
xor edi, edi
mov dword [esp + 0x24], 0
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], 0x8000
mov dword [esp + 0x4c], ebx
dec eax
mov dword [esp + 0x48], eax
xor eax, eax
jmp 0xba5877
mov ecx, dword [esp + 0x24]
test eax, eax
mov ecx, dword [edx + ecx*8 + 8]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x24]
mov ecx, dword [edx + ecx*8 + 0xc]
mov dword [esp + 0x3c], ecx
jne 0xba581a
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebp, eax
mov eax, dword [esp + 0x20]
mov edi, ecx
mov dword [esp + 0x34], eax
jmp 0xba5866
mov ecx, eax
xor ebx, ebx
add ecx, edi
adc ebx, ebp
cmp dword [esp + 0x3c], ebx
jne 0xba5846
cmp dword [esp + 0x38], ecx
jne 0xba5846
mov ecx, eax
shl ecx, 9
add ecx, dword [esp + 0x34]
xor ecx, dword [esp + 0x20]
and ecx, 0xffff0000
jne 0xba5846
inc eax
jmp 0xba586b
mov ecx, dword [esp + 0x38]
mov dword [esi], edi
mov word [esi + 8], ax
mov eax, dword [esp + 0x3c]
mov dword [esi + 4], ebp
add esi, 0xa
mov edi, ecx
mov ecx, dword [esp + 0x20]
mov ebp, eax
mov dword [esp + 0x34], ecx
mov eax, 1
add dword [esp + 0x20], 0x200
inc dword [esp + 0x24]
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0x24], ecx
jne 0xba57e8
test eax, eax
mov ebx, dword [esp + 0x4c]
je 0xba5896
mov dword [esi], edi
mov dword [esi + 4], ebp
mov word [esi + 8], ax
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x30]
cmp dword [esp + 0x80], 0
movzx eax, word [esi + 0x409210]
mov esi, dword [esp + 0x40]
mov edx, dword [esi + edi*8 - 0x18]
mov ecx, dword [esi + edi*8 - 0x14]
mov edi, dword [esp + 0x2c]
mov dword [eax + 0x409210], edx
mov dword [eax + 0x409214], ecx
mov edx, dword [esi + edi*8]
mov ecx, dword [esi + edi*8 + 4]
mov dword [eax + 0x409218], edx
mov dword [eax + 0x40921c], ecx
je 0xba592f
mov edi, dword [esp + 0x80]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
movzx eax, word [ebx + 4]
not ecx
cmp eax, ecx
jge 0xba591a
mov dword [esp + 4], 0x412cf1
mov eax, dword [0x4161d4]
add eax, 0x40
mov dword [esp], eax
call fcn.00ba56a0
mov dword [esp], 1
call fcn.00baac38
movzx edx, word [ebx + 2]
mov esi, dword [esp + 0x80]
add edx, 0x409210
mov edi, edx
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x84], 0
je 0xba5970
mov edi, dword [esp + 0x84]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
movzx eax, word [ebx + 8]
not ecx
cmp eax, ecx
jge 0xba595b
mov dword [esp + 4], 0x412d22
jmp 0xba58fe
movzx edx, word [ebx + 6]
mov esi, dword [esp + 0x84]
add edx, 0x409210
mov edi, edx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
xor eax, eax
mov edx, 0x3eb202fe
mov dword [edi + 0x10], 0
jmp 0xba598c
sub edx, dword [eax*4 + 0x409210]
inc eax
cmp eax, dword [esp + 0x28]
jl 0xba5984
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x10], edx
mov eax, dword [esp + 0x28]
shl eax, 2
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret