Function at 0x58a8c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x64
mov eax, dword [0x6d7160]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
mov ebp, dword [esp + 0x70]
push esi
mov al, 0xf
mov bl, 0x3f
push edi
mov edi, dword [ebp + 4]
mov esi, ecx
mov dl, 0x2f
mov cl, 0x1f
mov byte [esp + 0x52], al
mov byte [esp + 0x5f], al
mov byte [esp + 0x69], al
mov eax, dword [esi + 0x20694]
mov byte [esp + 0x4c], bl
mov byte [esp + 0x59], bl
mov byte [esp + 0x66], bl
xor ebx, ebx
add edi, 1
cmp edi, eax
mov dword [esp + 0x38], ebp
mov byte [esp + 0x48], 7
mov byte [esp + 0x49], 7
mov byte [esp + 0x4a], 0
mov byte [esp + 0x4b], 0
mov byte [esp + 0x4d], 0x37
mov byte [esp + 0x4e], dl
mov byte [esp + 0x4f], 0x27
mov byte [esp + 0x50], cl
mov byte [esp + 0x51], 0x17
mov byte [esp + 0x53], 7
mov byte [esp + 0x54], 0
mov byte [esp + 0x55], 7
mov byte [esp + 0x56], 7
mov byte [esp + 0x57], 0
mov byte [esp + 0x58], 0
mov byte [esp + 0x5a], 0x37
mov byte [esp + 0x5b], dl
mov byte [esp + 0x5c], 0x27
mov byte [esp + 0x5d], cl
mov byte [esp + 0x5e], 0x17
mov byte [esp + 0x60], 7
mov byte [esp + 0x61], 0
mov byte [esp + 0x62], 3
mov byte [esp + 0x63], 3
mov byte [esp + 0x64], 0
mov byte [esp + 0x65], 0
mov byte [esp + 0x67], dl
mov byte [esp + 0x68], cl
mov byte [esp + 0x6a], 0
mov dword [esp + 0x6b], ebx
mov dword [esp + 0x14], 0xff
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], 8
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], bl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
jl 0x58a9d7
mov ecx, dword [esi + 0x2068c]
add ecx, eax
cmp edi, ecx
jge 0x58a9d7
sub edi, eax
mov dword [esi + 0x20690], edi
jmp 0x58aa15
mov eax, dword [esi]
cmp dword [eax + 0x14], ebx
je 0x58a9f5
cmp dword [eax + 0x18], 0xffffffff
je 0x58aa03
mov ecx, dword [eax + 0x1c]
cmp ecx, edi
mov dword [eax + 0x18], edi
jbe 0x58a9f0
mov ecx, edi
mov dword [eax + 0x18], ecx
jmp 0x58aa03
mov edx, dword [eax + 4]
push ebx
push edi
push edx
call fcn.006081d8
add esp, 0xc
mov dword [esi + 0x20694], edi
mov dword [esi + 0x20690], ebx
mov dword [esi + 0x2068c], ebx
mov dword [esi + 0x20698], ebx
mov dword [esi + 0x20688], ebx
mov dword [esi + 0x20684], ebx
mov eax, dword [ebp]
cmp eax, dword [ebp + 8]
mov dword [esp + 0x34], eax
jae 0x58afac
jmp 0x58aa42
xor ebx, ebx
lea eax, [esp + 0x3c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], eax
mov edi, edi
mov ebx, dword [esp + 0x20]
cmp ebx, 0xffffffff
jne 0x58aa72
xor edi, edi
mov dword [esi + 0x20698], edi
mov dword [esi + 0x20688], edi
mov dword [esi + 0x20684], edi
jmp 0x58ab8a
test ebx, ebx
je 0x58ab88
cmp dword [esi + 0x20688], 0
jl 0x58ab88
cmp dword [esi + 0x20698], 0
jne 0x58ab36
cmp dword [esi + 0x20688], ebx
jge 0x58ab36
mov ecx, dword [esi + 0x20690]
add ecx, 8
cmp ecx, dword [esi + 0x2068c]
jl 0x58aaba
call fcn.0057f600
test eax, eax
je 0x58ab36
mov eax, dword [esi + 0x20690]
movzx ecx, byte [esi + eax + 0x2069c]
add eax, 1
cmp eax, dword [esi + 0x2068c]
mov dword [esi + 0x20690], eax
jge 0x58ab36
cmp dword [esi + 0x3bc], 0
je 0x58ab05
cmp ecx, 0xff
jne 0x58ab05
mov dl, byte [esi + eax + 0x2069c]
add eax, 1
test dl, dl
mov dword [esi + 0x20690], eax
je 0x58ab05
mov eax, 1
jmp 0x58ab07
xor eax, eax
test eax, eax
mov dword [esi + 0x20698], eax
jne 0x58ab36
mov eax, dword [esi + 0x20684]
add dword [esi + 0x20688], 8
shl eax, 8
add eax, ecx
mov dword [esi + 0x20684], eax
cmp dword [esi + 0x20698], 0
je 0x58aa94
mov eax, dword [esi + 0x20688]
mov edi, dword [esi + 0x20684]
mov ecx, 0x20
sub ecx, eax
shl edi, cl
mov ecx, 0x20
sub ecx, ebx
shr edi, cl
sub eax, ebx
mov dword [esi + 0x20688], eax
jns 0x58ab8a
cmp dword [esi + 0x3cc], 0
jne 0x58ab7f
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
jne 0x58ab7f
mov eax, dword [eax + 4]
test eax, eax
je 0x58ab7f
push eax
call fcn.006095df
add esp, 4
add dword [esi + 0x3cc], 1
jmp 0x58ab8a
xor edi, edi
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov ecx, ebx
shl edx, cl
or edx, edi
test eax, eax
movzx ebp, dx
mov dword [esp + 0x1c], ebp
jge 0x58abbd
lea ebx, [ebx + eax + 1]
cmp ebx, 1
jge 0x58abb5
lea eax, [ebx - 1]
mov dword [esp + 0x24], eax
jmp 0x58abbd
mov dword [esp + 0x24], 0
sub ebx, 1
js 0x58abd4
mov edx, ebp
mov cx, bx
shr dx, cl
cmp dl, 0xff
je 0x58abd4
sub ebx, 1
jns 0x58abc2
test ebx, ebx
jle 0x58ac07
lea ecx, [ebx - 1]
mov eax, 1
shl eax, cl
mov ecx, ebp
mov edi, 0xffff
and ecx, eax
lea edx, [ebp + ecx*2]
mov ecx, ebx
shl edi, cl
add eax, 0xffffffff
and eax, ebp
add eax, eax
and edx, edi
or edx, eax
movzx ebp, dx
mov dword [esp + 0x1c], ebp
test ebx, ebx
jl 0x58ad2b
cmp dword [esi + 0x20688], 0
jge 0x58ac1d
xor edi, edi
jmp 0x58ad1e
cmp dword [esi + 0x20698], 0
jne 0x58acd3
lea ebx, [ebx]
cmp dword [esi + 0x20688], 1
jge 0x58acd3
mov eax, dword [esi + 0x20690]
add eax, 8
cmp eax, dword [esi + 0x2068c]
jl 0x58ac57
call fcn.0057f600
test eax, eax
je 0x58acd3
mov eax, dword [esi + 0x20690]
movzx ecx, byte [esi + eax + 0x2069c]
add eax, 1
cmp eax, dword [esi + 0x2068c]
mov dword [esi + 0x20690], eax
jge 0x58acd3
cmp dword [esi + 0x3bc], 0
je 0x58aca2
cmp ecx, 0xff
jne 0x58aca2
mov dl, byte [esi + eax + 0x2069c]
add eax, 1
test dl, dl
mov dword [esi + 0x20690], eax
je 0x58aca2
mov eax, 1
jmp 0x58aca4
xor eax, eax
test eax, eax
mov dword [esi + 0x20698], eax
jne 0x58acd3
mov eax, dword [esi + 0x20684]
add dword [esi + 0x20688], 8
shl eax, 8
add eax, ecx
mov dword [esi + 0x20684], eax
cmp dword [esi + 0x20698], 0
je 0x58ac30
mov eax, dword [esi + 0x20688]
mov edi, dword [esi + 0x20684]
mov ecx, 0x20
sub ecx, eax
shl edi, cl
shr edi, 0x1f
add eax, 0xffffffff
mov dword [esi + 0x20688], eax
jns 0x58ad1e
cmp dword [esi + 0x3cc], 0
jne 0x58ad17
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
jne 0x58ad17
mov eax, dword [eax + 4]
test eax, eax
je 0x58ad17
push eax
call fcn.006095df
add esp, 4
add dword [esi + 0x3cc], 1
add ebp, edi
add ebx, 0xfffffff8
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebx
movzx edx, word [esp + 0x2c]
mov ecx, dword [esp + 0x14]
movzx eax, bp
sub eax, edx
lea eax, [eax*4 + 4]
and eax, 0x3fffc
sub eax, 1
sar ecx, 4
cdq
idiv ecx
mov edx, dword [esp + 0x18]
movzx ebx, byte [esp + edx + 0x4d]
lea edx, [esp + edx + 0x4a]
xor edi, edi
cmp ebx, eax
jle 0x58ad6d
movzx ebx, byte [edx + edi + 4]
add edi, 1
cmp ebx, eax
jg 0x58ad61
mov eax, dword [esp + 0x18]
lea ebx, [eax + edi]
movzx eax, byte [esp + ebx + 0x4d]
imul eax, ecx
sar eax, 2
test edi, edi
je 0x58ad90
movzx ebx, byte [esp + ebx + 0x4c]
imul ebx, ecx
sar ebx, 2
jmp 0x58ad94
mov ebx, dword [esp + 0x14]
sub ebx, eax
xor ecx, ecx
cmp ebx, 0x80
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ecx
jge 0x58adc5
jmp 0x58adb0
mov ebx, dword [esp + 0x14]
add ecx, 1
shl ebx, cl
cmp ebx, 0x80
jl 0x58adb0
mov dword [esp + 0x20], ecx
mov ebx, dword [esp + 0x2c]
add byte [edx], 1
shl dword [esp + 0x14], cl
add eax, ebx
mov bl, byte [edx]
shl eax, cl
cmp bl, byte [edx + 1]
movzx eax, ax
mov dword [esp + 0x2c], eax
movzx eax, byte [edx - 1]
mov ecx, eax
jbe 0x58ae15
movzx ebx, byte [edx - 2]
add ecx, 1
and ecx, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x30], eax
lea ebp, [ebx + ecx]
movzx ebx, byte [esp + ebp + 0x4d]
movzx eax, byte [esp + ebp + 0x4c]
sub eax, ebx
sar eax, 2
mov byte [edx + 1], al
mov eax, dword [esp + 0x30]
mov byte [edx], 1
mov ebx, dword [esp + 0x18]
add ebx, eax
movzx ebp, byte [esp + ebx + 0x4d]
movzx ebx, byte [esp + ebx + 0x4c]
sub ebx, ebp
cmp ebx, 1
jle 0x58ae5c
cmp edi, eax
jge 0x58ae44
mov eax, edi
add byte [edx + eax + 3], 0xff
movzx ebx, byte [edx - 1]
add eax, 1
cmp eax, ebx
jl 0x58ae32
jmp 0x58ae5c
cmp ecx, edi
jg 0x58ae5c
cmp eax, edi
jge 0x58ae5c
lea esp, [esp]
add byte [edx + eax + 3], 1
add eax, 1
cmp eax, edi
jl 0x58ae50
mov eax, dword [esp + 0x28]
mov byte [edx - 1], cl
mov ecx, dword [esp + 0x18]
add ecx, 0xd
mov dword [eax], edi
add eax, 4
cmp ecx, 0x27
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], eax
jl 0x58aa50
mov bl, byte [esp + 0x44]
mov al, byte [esp + 0x3c]
add bl, bl
add bl, bl
add bl, bl
or bl, byte [esp + 0x40]
mov cl, al
add bl, bl
add bl, bl
and cl, 3
or bl, cl
test al, 4
je 0x58aeab
test bl, bl
je 0x58aea9
neg bl
jmp 0x58aeab
mov bl, 0x80
mov eax, dword [esi]
cmp dword [eax + 0x14], 0
je 0x58aeb8
mov eax, dword [eax + 0x18]
jmp 0x58aec4
mov edx, dword [eax + 4]
push edx
call fcn.00609413
add esp, 4
mov ecx, dword [esp + 0x38]
add eax, 0xc
cmp eax, dword [ecx + 0xc]
jb 0x58aed2
xor bl, bl
mov ebp, dword [esp + 0x34]
movzx edi, word [esi + 0x45e]
xor edx, edx
mov eax, ebp
div edi
movzx edi, word [esi + 0x464]
mov ecx, ebp
and ecx, 1
add byte [esp + ecx + 0x10], bl
mov bl, byte [esp + ecx + 0x10]
mov dword [esp + 0x28], ecx
sub eax, edi
movzx edi, word [esi + 0x466]
sub edx, edi
movzx edi, word [esi + 0x460]
cmp eax, edi
jae 0x58af79
movzx edi, word [esi + 0x462]
cmp edx, edi
jae 0x58af79
movzx edi, word [esi + 0x468]
mov ebp, edx
and ebp, 1
mov ecx, eax
and ecx, 7
lea ecx, [ebp + ecx*2]
mov ebp, dword [esi + 0x338]
add ecx, ecx
shr ebp, cl
mov ecx, eax
mov dword [esp + 0x30], ecx
mov ecx, edi
mov edi, eax
shr edi, cl
movzx ecx, word [esi + 0x46c]
imul edi, ecx
movzx ecx, word [esi + 0x468]
shr edx, cl
mov ecx, dword [esi + 0x4d8]
and ebp, 3
movzx bx, bl
add edi, edx
lea edx, [ebp + edi*4]
mov ebp, dword [esp + 0x34]
mov word [ecx + edx*2], bx
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x58af98
movzx edx, word [esi + 0x45c]
mov ecx, eax
mov eax, dword [esp + 0x7c]
sub ecx, edx
and ecx, 7
sar eax, cl
test al, 1
je 0x58af98
add ebp, 2
mov ecx, dword [esp + 0x38]
add ebp, 1
cmp ebp, dword [ecx + 8]
mov dword [esp + 0x34], ebp
jb 0x58aa40
mov ecx, dword [esp + 0x70]
pop edi
mov dword [esi + 0x3ac], 0xff
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00607d6d
add esp, 0x64
ret 8