Function at 0x486020
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov esi, dword [esp + 0x2c]
push 0
push 0x14
push 1
call fcn.00436250
mov ecx, esi
add esp, 0xc
mov esi, eax
mov dword [eax], ecx
lea edi, [ecx - 1]
mov dword [eax + 4], edi
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], 0
test ecx, ecx
jne 0x486079
push 0x273
push str._home_simon_mem_.build_workdirs_bob_qvbm9mtj_putty_crypto_ntru.c
push str.n___0
call fcn.004ad8b3
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov ebp, esi
add ebp, 0xc
push 0
push 4
push ecx
call fcn.00436250
add esp, 0xc
mov dword [esp], eax
push 0
push 4
push dword [esp + 0x34]
call fcn.00436250
mov edx, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 4], eax
test edx, edx
je 0x486282
mov ecx, dword [esp + 0x28]
and edx, 3
mov dword [esp + 8], edx
xor edx, edx
cmp edi, 3
mov eax, dword [esp]
jb 0x4860f9
mov edi, dword [esp + 0x2c]
and edi, 0xfffffffc
xor edx, edx
nop
nop
nop
nop
movzx ebx, word [ecx + edx*2]
mov dword [eax + edx*4], ebx
movzx ebx, word [ecx + edx*2 + 2]
mov dword [eax + edx*4 + 4], ebx
movzx ebx, word [ecx + edx*2 + 4]
mov dword [eax + edx*4 + 8], ebx
movzx ebx, word [ecx + edx*2 + 6]
mov dword [eax + edx*4 + 0xc], ebx
add edx, 4
cmp edi, edx
jne 0x4860d0
cmp dword [esp + 8], 0
je 0x48611e
mov eax, dword [esp]
lea edi, [eax + edx*4]
mov eax, dword [esp + 8]
lea ecx, [ecx + edx*2]
xor edx, edx
nop
movzx ebx, word [ecx + edx*2]
mov dword [edi + edx*4], ebx
add edx, 1
cmp eax, edx
jne 0x486110
mov ecx, dword [esp + 0x2c]
cmp ecx, 2
jb 0x486287
mov edx, ecx
mov eax, dword [esp]
mov dword [esp + 0xc], ebp
jmp 0x486193
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.004362f0
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 0
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
mov eax, dword [eax + ebx*4]
mov dword [edi + ecx*4], eax
add ecx, 1
mov edx, ecx
mov eax, edi
cmp ecx, 1
jbe 0x48628a
mov edi, dword [esp + 4]
mov dword [esp + 4], eax
xor ebx, ebx
xor ecx, ecx
mov dword [esp], edi
mov dword [esp + 0x10], edx
jmp 0x4861ce
mov eax, edi
mov ebp, dword [esp + 0xc]
mov edi, dword [esp]
mov ecx, dword [esp + 8]
mov dword [edi + ecx*4], eax
add ecx, 1
add ebx, 2
mov edx, dword [esp + 0x10]
cmp ebx, edx
jae 0x486186
mov eax, ebx
or eax, 1
cmp eax, edx
mov dword [esp + 8], ecx
je 0x486140
mov ecx, ebp
mov edx, dword [esp + 4]
mov ebp, dword [edx + ebx*4]
mov edi, dword [edx + eax*4]
imul edi, ebp
add ebp, 2
push 0
push 1
push dword [esi + 8]
push 4
push ecx
push dword [esi + 0x10]
call fcn.004362f0
add esp, 0x18
mov dword [esi + 0x10], eax
movzx ecx, bp
mov edx, dword [esi + 8]
lea ebp, [edx + 1]
mov dword [esi + 8], ebp
mov dword [eax + edx*4], ecx
cmp cx, 1
je 0x48622b
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
cmp edi, 0x4000
jb 0x4861b0
mov ebp, dword [esp + 0xc]
nop
nop
nop
nop
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.004362f0
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 1
add edi, 0xff
mov eax, edi
shr eax, 8
cmp edi, 0x3fffff
mov edi, eax
ja 0x486240
jmp 0x4861b6
mov edi, dword [esp]
jmp 0x48628f
mov edi, dword [esp]
cmp ecx, 1
je 0x4862a6
push 0x2b5
push str._home_simon_mem_.build_workdirs_bob_qvbm9mtj_putty_crypto_ntru.c
push str.n__1
call fcn.004ad8b3
add esp, 0xc
mov ebx, edi
mov edi, dword [edi]
cmp edi, 2
jb 0x4862ed
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.004362f0
add esp, 0x18
mov dword [esi + 0x10], eax
mov ecx, dword [esi + 8]
lea edx, [ecx + 1]
mov dword [esi + 8], edx
mov dword [eax + ecx*4], 1
add edi, 0xff
mov eax, edi
shr eax, 8
cmp edi, 0x1ff
mov edi, eax
ja 0x4862b0
push ebx
call fcn.004362e0
add esp, 4
push dword [esp + 4]
call fcn.004362e0
add esp, 4
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret