Function at 0x456820
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.004143e0
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 0x456879
push 0x273
push str._home_simon_mem_.build_workdirs_bob_u160jzna_putty_crypto_ntru.c
push str.n___0
call fcn.0047ef54
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov ebp, esi
add ebp, 0xc
push 0
push 4
push ecx
call fcn.004143e0
add esp, 0xc
mov dword [esp], eax
push 0
push 4
push dword [esp + 0x34]
call fcn.004143e0
mov edx, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 4], eax
test edx, edx
je 0x456a82
mov ecx, dword [esp + 0x28]
and edx, 3
mov dword [esp + 8], edx
xor edx, edx
cmp edi, 3
mov eax, dword [esp]
jb 0x4568f9
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 0x4568d0
cmp dword [esp + 8], 0
je 0x45691e
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 0x456910
mov ecx, dword [esp + 0x2c]
cmp ecx, 2
jb 0x456a87
mov edx, ecx
mov eax, dword [esp]
mov dword [esp + 0xc], ebp
jmp 0x456993
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00414480
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 0x456a8a
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 0x4569ce
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 0x456986
mov eax, ebx
or eax, 1
cmp eax, edx
mov dword [esp + 8], ecx
je 0x456940
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.00414480
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 0x456a2b
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
cmp edi, 0x4000
jb 0x4569b0
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.00414480
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 0x456a40
jmp 0x4569b6
mov edi, dword [esp]
jmp 0x456a8f
mov edi, dword [esp]
cmp ecx, 1
je 0x456aa6
push 0x2b5
push str._home_simon_mem_.build_workdirs_bob_u160jzna_putty_crypto_ntru.c
push str.n__1
call fcn.0047ef54
add esp, 0xc
mov ebx, edi
mov edi, dword [edi]
cmp edi, 2
jb 0x456aed
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00414480
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 0x456ab0
push ebx
call fcn.00414470
add esp, 4
push dword [esp + 4]
call fcn.00414470
add esp, 4
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret