Function at 0x10501120
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x68]
imul eax, dword [esp + 0x6c]
push ebx
mov ebx, dword [esp + 0x68]
push ebp
mov ebp, dword [esp + 0x68]
push esi
mov esi, dword [esp + 0x84]
mov ecx, eax
imul ecx, dword [esp + 0x7c]
push edi
mov edi, dword [esp + 0x6c]
mov edx, edi
imul edx, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], ecx
mov byte [esp + 0x13], 0
imul edx, ebx
mov dword [esp + 0x3c], edx
test ecx, ecx
je 0x1050117d
push ecx
lea eax, [esi + 0x798]
push 0
push eax
call fcn.10513d40
mov edx, dword [esp + 0x48]
add esp, 0xc
test edx, edx
je 0x1050118d
push edx
push 0
push esi
call fcn.10513d40
add esp, 0xc
xor eax, eax
mov dword [esp + 0x44], eax
test ebx, ebx
je 0x10501634
xor ecx, ecx
mov edx, ebx
mov dword [esp + 0x48], ecx
xor ebx, ebx
mov dword [esp + 0x54], ebx
test ebp, ebp
je 0x10501621
test edi, edi
je 0x10501608
mov eax, ebp
lea ecx, [ebp - 1]
shr eax, 1
xor edx, edx
add eax, 0x400
div ecx
mov ecx, dword [esp + 0x7c]
xor edx, edx
mov edi, eax
dec ecx
imul edi, ecx
mov ecx, dword [esp + 0x74]
mov eax, ecx
shr eax, 1
dec ecx
add eax, 0x400
div ecx
mov ecx, dword [esp + 0x80]
mov ebp, eax
imul edi, ebx
dec ecx
add ebx, dword [esp + 0x48]
imul ebp, ecx
add edi, 0x20
shr edi, 6
imul ebp, dword [esp + 0x44]
mov ecx, edi
sar ecx, 4
and edi, 0xf
add ebp, 0x20
shr ebp, 6
mov eax, ebp
and ebp, 0xf
sar eax, 4
mov edx, eax
mov dword [esp + 0x34], ebp
imul edx, dword [esp + 0x7c]
inc eax
imul eax, dword [esp + 0x7c]
add edx, ecx
inc ecx
imul edx, dword [esp + 0x78]
add eax, ecx
imul eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x6c]
imul ebx, ecx
mov dword [esp + 0x58], edx
xor edx, edx
mov dword [esp + 0x5c], eax
mov eax, ecx
shr eax, 1
dec ecx
add eax, 0x400
mov dword [esp + 0x14], ebx
div ecx
mov edx, dword [esp + 0x78]
lea ecx, [edx - 1]
imul eax, ecx
mov ecx, 0x20
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x64], eax
lea eax, [ebx*4 + 0x438]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x50], eax
mov ebx, ecx
mov ecx, dword [esp + 0x58]
shr ebx, 6
mov eax, ebx
and ebx, 0xf
sar eax, 4
add ecx, eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x5c]
inc ecx
add eax, ecx
cmp edi, ebx
mov dword [esp + 0x40], eax
sbb ecx, ecx
and ecx, 4
cmp ebp, ebx
sbb eax, eax
neg eax
add ecx, eax
cmp ebp, edi
sbb eax, eax
and eax, 2
add ecx, eax
jmp dword [ecx*4 + 0x10501a2c]
inc ebx
mov dword [esp + 0x54], ebx
cmp ebx, ebp
jb 0x105011b1
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x74]
inc eax
add ecx, ebp
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
cmp eax, edx
jb 0x105011a3
mov ecx, dword [esp + 0x3c]
xor dh, dh
xorps xmm1, xmm1
test ecx, ecx
je 0x10501756
mov ebx, dword [esp + 0x84]
lea eax, [esi + 0x438]
movss xmm2, dword [0x107208c8]
mov dword [esp + 0x74], eax
mov dword [esp + 0x54], ecx
lea ebp, [ebx + 0x43e]
add ebx, 0xe60
mov dword [esp + 0x70], ebx
mov dl, byte [esi]
lea edi, [ebx - 0x6c0]
mov byte [ebp - 0x438], dl
cmp dh, dl
mov byte [ebp], 0
mov dword [edi], 0
movzx ecx, dl
movzx eax, dh
lea edx, [ebp - 0x360]
mov byte [edx], 0
cmova ecx, eax
mov byte [ebp + 0xd8], 0
mov dword [ebx - 0x360], 0
mov byte [ebp - 0x288], 0
mov byte [ebp + 0x1b0], 0
mov dword [ebx], 0
mov byte [ebp - 0x1b0], 0
mov byte [ebp + 0x288], 0
mov dword [ebx + 0x360], 0
xor ebx, ebx
mov byte [ebp - 0xd8], 0
mov byte [esp + 0x6c], cl
cmp byte [esi], bl
jbe 0x1050172e
mov ecx, dword [esp + 0x74]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + 0x360], al
lea edi, [edi + 0x360]
movzx eax, byte [ecx - 1]
inc ebx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
movss dword [edi - 0x360], xmm0
mov al, byte [ecx - 0x361]
mov byte [edx], al
add edx, 0xd8
movzx eax, byte [esi]
cmp ebx, eax
jb 0x105016f0
mov ebx, dword [esp + 0x70]
inc esi
add dword [esp + 0x74], 4
add ebx, 4
mov dh, byte [esp + 0x6c]
inc ebp
sub dword [esp + 0x54], 1
mov dword [esp + 0x70], ebx
jne 0x10501672
mov esi, dword [esp + 0x88]
mov ebp, dword [esp + 0x84]
xor ebx, ebx
mov dword [esp + 0x54], ebx
mov byte [ebp + 1], dh
cmp dword [esp + 0x38], ebx
jbe 0x105018e3
movzx eax, byte [esp + 0x13]
lea ecx, [esi + 0x3dd8]
mov edx, ebp
mov dword [esp + 0x70], eax
mov dword [esp + 0x4c], ecx
lea ebp, [edx + 0x12360]
mov dword [esp + 0x50], ebp
nop
mov al, byte [esi + ebx + 0x798]
add edx, 0x1560
add edx, ebx
movzx edi, al
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], edx
mov byte [edx - 0x40], al
test al, al
je 0x10501859
mov esi, ecx
mov dword [esp + 0x74], edi
nop dword [eax + eax]
mov al, byte [esi - 0x3600]
xor edi, edi
mov byte [edx], al
movzx ecx, al
movzx eax, byte [esi]
mov dword [ebp], 0
movd xmm0, eax
mov eax, dword [esp + 0x84]
cvtdq2ps xmm0, xmm0
lea edx, [eax + 0xde]
add edx, ecx
add ecx, 0x1e8
movss dword [ebp - 0xd800], xmm0
lea ecx, [eax + ecx*4]
nop
movzx eax, byte [edx]
cmp eax, ebx
jne 0x10501814
movss xmm0, dword [ecx]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jp 0x10501828
inc edi
add ecx, 0x360
add edx, 0xd8
cmp edi, 4
jb 0x10501800
jmp 0x1050182d
movss dword [ebp], xmm0
mov edx, dword [esp + 0x6c]
inc esi
add edx, 0x40
add ebp, 0x100
sub dword [esp + 0x74], 1
mov dword [esp + 0x6c], edx
jne 0x105017c0
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x64]
mov ebp, dword [esp + 0x50]
mov edx, dword [esp + 0x84]
mov ecx, edi
shl ecx, 6
add ecx, ebx
mov al, byte [ecx + edx + 0x1520]
mov byte [esp + 0x6c], al
cmp edi, dword [esp + 0x70]
jae 0x105018b8
mov bl, byte [esp + 0x6c]
lea eax, [edx + 0x1560]
add edx, 0x4b60
add eax, ecx
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x70]
sub edx, edi
mov byte [eax], bl
lea ecx, [ecx + 0x100]
mov dword [ecx - 0x100], 0
lea eax, [eax + 0x40]
sub edx, 1
jne 0x10501893
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x4c]
inc ebx
add ebp, 4
mov dword [esp + 0x54], ebx
add ecx, 0xd8
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], ecx
cmp ebx, dword [esp + 0x38]
jb 0x10501790
mov ebp, dword [esp + 0x84]
mov ebx, dword [esp + 0x3c]
lea edx, [ebx + 3]
and edx, 0xfffffffc
cmp ebx, edx
jae 0x1050197c
lea eax, [ebx + 0xde]
lea ecx, [ebx*4 + 0xb00]
add eax, ebp
add ecx, ebp
sub edx, ebx
nop dword [eax + eax]
mov byte [eax - 0xd8], 0
lea ecx, [ecx + 4]
mov dword [ecx - 0x364], 0
lea eax, [eax + 1]
mov byte [eax - 1], 0
mov byte [eax + 0x35f], 0
mov dword [ecx - 4], 0
mov byte [eax + 0xd7], 0
mov byte [eax + 0x437], 0
mov dword [ecx + 0x35c], 0
mov byte [eax + 0x1af], 0
mov byte [eax + 0x50f], 0
mov dword [ecx + 0x6bc], 0
mov byte [eax + 0x287], 0
mov byte [eax + 0x5e7], 0
sub edx, 1
jne 0x10501910
mov ecx, dword [esp + 0x38]
movzx eax, byte [ecx + esi + 0x797]
lea edi, [ecx + 3]
shl eax, 6
and edi, 0xfffffffc
add eax, ecx
mov bl, byte [eax + ebp + 0x151f]
cmp ecx, edi
jae 0x10501a02
movzx edx, byte [esp + 0x13]
lea esi, [ecx + 0x1560]
add esi, ebp
mov dword [esp + 0x6c], edx
lea ebp, [ebp + ecx*4]
add ebp, 0x4b60
sub edi, ecx
nop dword [eax + eax]
mov byte [esi - 0x40], 0
test edx, edx
je 0x105019ee
mov eax, esi
mov ecx, ebp
nop dword [eax]
mov byte [eax], bl
lea ecx, [ecx + 0x100]
mov dword [ecx - 0x100], 0
lea eax, [eax + 0x40]
sub edx, 1
jne 0x105019d0
mov edx, dword [esp + 0x6c]
add ebp, 4
inc esi
sub edi, 1
jne 0x105019c0
mov ebp, dword [esp + 0x84]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov byte [ebp], al
mov eax, dword [esp + 0x78]
mov byte [ebp + 3], al
mov eax, dword [esp + 0x7c]
pop edi
mov byte [ebp + 4], al
mov eax, dword [esp + 0x7c]
pop esi
mov byte [ebp + 2], cl
mov byte [ebp + 5], al
pop ebp
pop ebx
add esp, 0x58
ret