Function at 0x4595d8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x210], 0
je 0x4595f7
xor eax, eax
jmp 0x4597ed
mov edx, dword [ebp + 0x10]
push edx
call fcn.00457ef0
pop ecx
test eax, eax
je 0x459611
cmp dword [ebp + 0xc], 0
jg 0x459618
cmp dword [ebp + 0x18], 0
je 0x459618
xor eax, eax
jmp 0x4597ed
mov edx, dword [ebp + 0x10]
push edx
call fcn.00457b40
pop ecx
cmp dword [ebx], 0
jne 0x459749
mov dword [ebp - 8], 4
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
and eax, 0x7fffffff
mov dword [ebp - 0xc], eax
dec dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
imul edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
xor edx, edx
mov dword [ebp - 4], edx
test eax, eax
je 0x45966e
inc dword [ebp - 4]
shr eax, 8
inc dword [ebp - 0x10]
test eax, eax
jne 0x459661
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
cdq
idiv ecx
mov dword [ebp - 4], edx
cmp dword [ebp + 0xc], 0
jle 0x45969a
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp + 0xc]
jle 0x45969a
push 0xe
push ebx
call fcn.004570d8
add esp, 8
xor eax, eax
jmp 0x4597ed
cmp dword [ebp + 0x18], 0
je 0x4596be
mov edx, dword [ebp + 0xc]
mov eax, esi
sub edx, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
xor edx, edx
cmp edx, dword [ebp - 0x14]
jge 0x4596c3
mov byte [eax], 0
inc edx
inc eax
cmp edx, dword [ebp - 0x14]
jl 0x4596b2
jmp 0x4596c3
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 4], 0
je 0x4596f8
mov eax, dword [ebp + 0x10]
mov edx, dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*4]
dec dword [ebp - 0xc]
mov edx, dword [ebp - 4]
dec edx
lea ecx, [esi + edx]
mov ebx, dword [ebp - 0x14]
add ecx, ebx
test edx, edx
jl 0x4596f8
mov ebx, eax
dec edx
and bl, 0xff
mov byte [ecx], bl
dec ecx
shr eax, 8
test edx, edx
jge 0x4596e8
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
lea ecx, [esi + eax]
mov dword [ebp - 0x1c], ecx
cmp edx, dword [ebp - 0x10]
jge 0x4597df
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0xc]
mov eax, dword [ecx + eax*4]
dec dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x1c]
add ebx, edx
dec ecx
test ecx, ecx
lea esi, [ebx + ecx]
jl 0x45973c
mov ebx, eax
dec ecx
and bl, 0xff
mov byte [esi], bl
dec esi
shr eax, 8
test ecx, ecx
jge 0x45972c
add edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x10]
jl 0x45970d
jmp 0x4597df
mov eax, dword [ebx + 0x1bc]
push eax
mov edx, dword [ebp + 0x10]
push edx
call fcn.00457ce0
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [ebx + 0x210], 0
jne 0x4597df
mov eax, dword [ebx + 0x1bc]
push eax
call fcn.00457ef0
pop ecx
test eax, eax
jne 0x459789
cmp dword [ebp + 0x18], 0
je 0x4597df
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp + 0xc]
je 0x4597df
cmp dword [ebp + 0xc], 0
jle 0x4597a6
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp + 0xc]
jl 0x4597a6
push 0xe
push ebx
call fcn.004570d8
add esp, 8
xor eax, eax
jmp 0x4597ed
mov edi, dword [ebx + 0x1bc]
push edi
push pe_nt_image_headers32
push edi
push ebx
call fcn.00459338
add esp, 0x10
mov byte [ebp - 0x15], al
mov edx, dword [ebp - 0x10]
lea eax, [esi + edx - 1]
test edx, edx
jle 0x4597d5
mov cl, byte [eax]
dec edx
mov byte [eax + 1], cl
dec eax
test edx, edx
jg 0x4597ca
mov al, byte [ebp - 0x15]
mov byte [esi], al
inc dword [ebp - 0x10]
jmp 0x459761
cmp dword [ebp + 0x18], 0
je 0x4597ea
mov eax, dword [ebp + 0xc]
jmp 0x4597ed
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret