Function at 0x431f10
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov ecx, dword [0x520f20]
sub esp, 0x1c
mov eax, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x40]
shr eax, 2
test esi, esi
push edi
jge 0x431f54
neg eax
mov dword [esp + 0x1c], eax
lea eax, [ecx*4 + 0x100]
lea edi, [ecx + 0x10]
and eax, 0x3ff
and edi, 0xff
and ecx, 0x3ff
mov eax, dword [eax*4 + 0x573b20]
jmp 0x431f82
mov dword [esp + 0x1c], eax
lea edx, [ecx + 0x100]
lea eax, [ecx*4]
mov edi, ecx
and edx, 0x3ff
mov ecx, eax
and edi, 0xff
and ecx, 0x3ff
mov eax, dword [edx*4 + 0x573b20]
mov edx, dword [ecx*4 + 0x573b20]
mov byte [0x49e298], 0
add eax, edx
mov byte [0x49e299], 0
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, 0x32
test esi, esi
mov dword [esp + 0x18], eax
jge 0x432004
mov esi, 2
lea ebx, [edi - 2]
mov ecx, esi
sub ecx, edi
test ecx, ecx
jg 0x431fc2
mov ecx, ebx
and ecx, 0x7f
cmp ecx, 0x40
jle 0x431fd3
mov edx, pe_nt_image_headers32
sub edx, ecx
mov ecx, edx
cmp ecx, 0xf
jge 0x431ff1
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
add dl, 0x2a
mov byte [esi + 0x49e298], dl
jmp 0x431ff8
mov byte [esi + 0x49e298], 0
inc esi
dec ebx
cmp esi, 0x100
jl 0x431fb8
jmp 0x43204c
mov ecx, 2
lea esi, [edi - 2]
mov eax, ecx
sub eax, edi
test eax, eax
jg 0x432016
mov eax, esi
and eax, 0x7f
cmp eax, 0x40
jle 0x432027
mov edx, pe_nt_image_headers32
sub edx, eax
mov eax, edx
cmp eax, 0xe
jge 0x43203b
cdq
sub eax, edx
sar eax, 1
add al, 0x28
mov byte [ecx + 0x49e298], al
jmp 0x432042
mov byte [ecx + 0x49e298], 0
inc ecx
dec esi
cmp ecx, 0x100
jl 0x43200c
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x38]
shl ecx, 8
mov eax, ecx
cdq
idiv edi
mov ebx, eax
mov eax, ecx
cdq
idiv dword [esp + 0x3c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], ebx
mov ecx, eax
lea eax, [ebx + edx]
test eax, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x44], eax
jl 0x43228b
mov esi, dword [0x58bb9c]
mov eax, edx
sub eax, ebx
cmp eax, esi
jg 0x43228b
mov esi, dword [esp + 0x34]
lea eax, [ecx + esi]
test eax, eax
mov dword [esp + 0x24], eax
jl 0x43228b
mov eax, dword [0x58bb98]
sub esi, ecx
cmp esi, eax
jg 0x43228b
mov eax, ebx
neg eax
mov ebp, eax
mov dword [esp + 0x14], ebp
lea esi, [ebp + edx]
test esi, esi
jge 0x4320d0
neg edx
mov dword [esp + 0x14], edx
mov ebp, edx
mov edx, dword [esp + 0x34]
neg ecx
mov dword [esp + 0x38], ecx
lea esi, [ecx + edx]
test esi, esi
jge 0x4320e9
mov ecx, edx
neg ecx
mov dword [esp + 0x38], ecx
mov edx, dword [0x58bb9c]
mov esi, dword [esp + 0x44]
cmp esi, edx
mov dword [esp + 0x10], ebx
jle 0x432103
sub edx, dword [esp + 0x30]
mov dword [esp + 0x10], edx
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
cmp esi, dword [0x58bb98]
mov dword [esp + 0x44], edx
jle 0x432127
mov edx, dword [0x58bb98]
mov esi, dword [esp + 0x34]
sub edx, esi
mov dword [esp + 0x44], edx
cmp eax, ebx
jge 0x43216a
mov esi, eax
lea ecx, [ebx + eax]
imul esi, edi
shl ecx, 2
sub ebx, eax
mov eax, esi
add ecx, 4
cdq
and edx, 0xff
add esi, edi
add eax, edx
sar eax, 8
mov edx, eax
imul edx, eax
shl eax, 6
mov dword [ecx + 0x4a01f4], edx
mov dword [ecx + 0x4a03f4], eax
dec ebx
jne 0x432138
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x30]
imul eax, eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x34]
mov esi, dword [0x58bba4]
lea edi, [ecx + eax]
imul edi, dword [0x58bba0]
add edi, ebp
add edi, ebx
add edi, esi
cmp ecx, edx
mov dword [esp + 0x34], edi
jge 0x43228b
mov esi, ecx
imul esi, dword [esp + 0x3c]
sub edx, ecx
mov dword [esp + 0x30], esi
mov dword [esp + 0x40], edx
mov eax, esi
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ebx, eax
imul ebx, eax
shl eax, 6
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x10]
cmp ebp, eax
jge 0x432266
mov ecx, dword [esp + 0x28]
mov eax, edi
lea esi, [ebp + ecx]
shl esi, 2
sub eax, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
mov edx, dword [esi + 0x4a01f8]
mov edi, dword [esi + 0x4a03f8]
sub eax, edx
sub eax, ebx
js 0x43224e
mov ecx, dword [eax*4 + 0x502360]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
add ecx, edx
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x1c]
add edx, eax
mov eax, edi
and edx, 0x7f
shl edx, 7
mov dword [esp + 0x24], edx
cdq
idiv ecx
mov ecx, dword [esp + 0x24]
xor edx, edx
and eax, 0x7f
mov dl, byte [ecx + eax + 0x56fb00]
xor eax, eax
mov al, byte [edx + 0x49e298]
test eax, eax
je 0x43224e
mov edx, dword [esp + 0x20]
mov byte [ebp + edx], al
mov eax, dword [esp + 0x10]
inc ebp
add esi, 4
cmp ebp, eax
jl 0x4321e9
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
mov edx, dword [0x58bba0]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add edi, edx
add esi, ecx
dec eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x40], eax
jne 0x4321b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret