Function at 0x4857d0
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.004392c0
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 0x485829
push 0x273
push str._home_simon_mem_.build_workdirs_bob_fffbk9my_putty_crypto_ntru.c
push str.n___0
call fcn.004adb03
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov ebp, esi
add ebp, 0xc
push 0
push 4
push ecx
call fcn.004392c0
add esp, 0xc
mov dword [esp], eax
push 0
push 4
push dword [esp + 0x34]
call fcn.004392c0
mov edx, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 4], eax
test edx, edx
je 0x485a32
mov ecx, dword [esp + 0x28]
and edx, 3
mov dword [esp + 8], edx
xor edx, edx
cmp edi, 3
mov eax, dword [esp]
jb 0x4858a9
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 0x485880
cmp dword [esp + 8], 0
je 0x4858ce
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 0x4858c0
mov ecx, dword [esp + 0x2c]
cmp ecx, 2
jb 0x485a37
mov edx, ecx
mov eax, dword [esp]
mov dword [esp + 0xc], ebp
jmp 0x485943
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00439360
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 0x485a3a
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 0x48597e
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 0x485936
mov eax, ebx
or eax, 1
cmp eax, edx
mov dword [esp + 8], ecx
je 0x4858f0
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.00439360
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 0x4859db
mov eax, dword [esi + 4]
add eax, 1
xor edx, edx
div dword [esi]
mov dword [esi + 4], edx
cmp edi, 0x4000
jb 0x485960
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.00439360
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 0x4859f0
jmp 0x485966
mov edi, dword [esp]
jmp 0x485a3f
mov edi, dword [esp]
cmp ecx, 1
je 0x485a56
push 0x2b5
push str._home_simon_mem_.build_workdirs_bob_fffbk9my_putty_crypto_ntru.c
push str.n__1
call fcn.004adb03
add esp, 0xc
mov ebx, edi
mov edi, dword [edi]
cmp edi, 2
jb 0x485a9d
nop
push 0
push 1
push dword [esi + 8]
push 4
push ebp
push dword [esi + 0x10]
call fcn.00439360
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 0x485a60
push ebx
call fcn.00439350
add esp, 4
push dword [esp + 4]
call fcn.00439350
add esp, 4
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret