Function at 0x60409e60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 4]
mov dword [ebp - 0x40], eax
test ecx, ecx
je 0x6040a5fc
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x24]
mov edx, dword [ebx + 0x28]
cmp edx, eax
jae 0x6040a5ef
mov ebx, dword [ebp - 0x40]
push edi
push edi
push 0x20
push ebx
call sym.exchndl.dll_bfd_alloc
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x40]
mov edi, dword [ebx + 0x28]
mov dword [ebp - 0x44], eax
mov dword [eax], edx
mov edx, dword [ebp - 0x44]
mov eax, dword [ebx + 0x20]
mov ebx, 4
mov dword [edx + 0xc], eax
mov dword [edx + 4], 0
mov dword [edx + 8], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x18], 0
mov dword [edx + 0x1c], 0
mov ecx, dword [esi + 0x20]
add edi, ecx
pop eax
mov eax, dword [ebp - 0x40]
pop edx
push edi
add edi, 4
push eax
call fcn.604091d0
add esp, 0x10
cmp eax, 0xffffffff
mov dword [ebp - 0x38], eax
je 0x6040a5de
test eax, eax
jne 0x60409f18
mov esi, dword [ebp + 8]
cmp byte [esi + 0x40], 8
je 0x6040a5bf
mov eax, dword [ebp - 0x38]
add eax, edi
push edx
mov dword [ebp - 0x48], eax
push edx
mov eax, dword [ebp - 0x40]
push edi
push eax
add edi, 2
call fcn.604091b0
add esp, 0x10
cmp ebx, 4
mov word [ebp - 0x34], ax
je 0x6040a5ae
push eax
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.604091f0
mov ecx, dword [ebp - 0x40]
add edi, ebx
pop esi
mov dword [ebp - 0x30], eax
pop eax
push edi
inc edi
push ecx
call fcn.60409190
pop esi
mov ebx, dword [ebp - 0x40]
pop edx
mov byte [ebp - 0x2c], al
push edi
inc edi
push ebx
call fcn.60409190
pop edx
pop ecx
mov byte [ebp - 0x2b], al
push edi
mov eax, dword [ebp - 0x40]
inc edi
push eax
call fcn.604091a0
mov ecx, dword [ebp - 0x40]
pop ebx
mov dword [ebp - 0x28], eax
pop esi
push edi
inc edi
push ecx
call fcn.60409190
mov ebx, dword [ebp - 0x40]
pop esi
mov byte [ebp - 0x24], al
pop edx
push edi
inc edi
push ebx
mov ebx, 1
call fcn.60409190
pop edx
pop ecx
mov byte [ebp - 0x23], al
and eax, 0xff
push eax
mov eax, dword [ebp - 0x40]
push eax
call sym.exchndl.dll_bfd_alloc
add esp, 0x10
mov dword [ebp - 0x20], eax
mov byte [eax], 1
cmp byte [ebp - 0x23], 1
jbe 0x60409fe5
mov esi, dword [ebp - 0x40]
push eax
push eax
push edi
inc edi
push esi
call fcn.60409190
mov edx, dword [ebp - 0x20]
add esp, 0x10
mov byte [ebx + edx], al
xor eax, eax
inc ebx
mov al, byte [ebp - 0x23]
cmp ebx, eax
jb 0x60409fc5
lea ebx, [ebp - 0x3c]
mov esi, dword [ebp - 0x40]
push eax
push ebx
push edi
push esi
call fcn.60409220
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x6040a067
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
add edi, ecx
mov ecx, dword [edx + 8]
mov edx, 5
mov esi, edx
mov eax, ecx
xor edx, edx
div esi
test edx, edx
je 0x6040a030
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x10]
mov dword [eax + ecx*4], ebx
lea eax, [ecx + 1]
mov dword [edx + 8], eax
jmp 0x60409fe5
lea eax, [ecx*4 + 0x14]
push edx
push edx
push eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x10]
push eax
call sym.exchndl.dll_bfd_realloc
mov edx, dword [ebp - 0x44]
add esp, 0x10
mov dword [edx + 0x10], eax
xor edx, edx
test eax, eax
je 0x6040a05d
mov esi, dword [ebp - 0x44]
mov ecx, dword [esi + 8]
jmp 0x6040a019
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x3c]
add edi, ebx
lea esi, [esi]
lea ebx, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push ebx
push edi
push eax
call fcn.60409220
add esp, 0x10
test eax, eax
mov dword [ebp - 0x4c], eax
je 0x6040a15a
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x3c]
add edi, ecx
mov edx, 5
mov ecx, dword [esi + 4]
mov esi, edx
mov eax, ecx
xor edx, edx
div esi
test edx, edx
jne 0x6040a0d3
lea eax, [ecx + 5]
shl eax, 4
push edx
push edx
push eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x14]
push eax
call sym.exchndl.dll_bfd_realloc
mov edx, dword [ebp - 0x44]
add esp, 0x10
mov dword [edx + 0x14], eax
xor edx, edx
test eax, eax
je 0x6040a05d
mov ebx, dword [ebp - 0x44]
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 0x44]
mov ebx, ecx
shl ebx, 4
mov edx, dword [ebp - 0x4c]
mov esi, dword [eax + 0x14]
mov dword [esi + ebx], edx
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.60409410
add esp, 0xc
mov edx, dword [ebp - 0x44]
mov dword [esi + ebx + 4], eax
mov eax, dword [ebp - 0x3c]
add edi, eax
mov esi, dword [edx + 0x14]
lea eax, [ebp - 0x3c]
mov ebx, dword [edx + 4]
shl ebx, 4
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.60409410
mov edx, dword [ebp - 0x44]
add esp, 0xc
mov dword [esi + ebx + 8], eax
mov ecx, dword [ebp - 0x3c]
mov ebx, dword [edx + 4]
mov esi, dword [edx + 0x14]
add edi, ecx
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
push eax
shl ebx, 4
push edi
push edx
call fcn.60409410
mov edx, dword [ebp - 0x44]
add esp, 0x10
mov dword [esi + ebx + 0xc], eax
mov eax, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [edx + 4]
inc eax
mov dword [edx + 4], eax
jmp 0x6040a070
mov eax, dword [ebp - 0x3c]
add edi, eax
cmp edi, dword [ebp - 0x48]
jb 0x6040a16c
mov edx, dword [ebp - 0x44]
jmp 0x6040a05d
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x50], 0
push eax
push eax
push 1
push esi
call fcn.60409c80
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
add esp, 0x10
mov ecx, dword [ebp - 0x40]
push ebx
push ebx
push edi
inc edi
push ecx
call fcn.60409190
mov dl, byte [ebp - 0x23]
add esp, 0x10
cmp al, dl
jae 0x6040a520
xor ecx, ecx
mov cl, al
cmp ecx, 9
ja case.default.0x6040a1ca
jmp dword [ecx*4 + 0x6040a1d4]
inc edi
mov eax, dword [ebp - 0x40]
push edx
push edx
push edi
push eax
inc edi
call fcn.60409190
add esp, 0x10
and eax, 0xff
cmp eax, 2
je 0x6040a3b0
cmp eax, 2
jle 0x6040a350
cmp eax, 3
jne 0x6040a32f
lea ebx, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push ebx
push edi
push eax
call fcn.60409220
mov esi, dword [ebp - 0x3c]
mov edx, 5
add edi, esi
mov dword [ebp - 0x4c], eax
mov esi, dword [ebp - 0x44]
add esp, 0x10
mov ecx, dword [esi + 4]
mov esi, edx
mov eax, ecx
xor edx, edx
div esi
test edx, edx
jne 0x6040a28c
lea eax, [ecx + 5]
shl eax, 4
push ebx
push ebx
push eax
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0x14]
push ecx
call sym.exchndl.dll_bfd_realloc
mov edx, dword [ebp - 0x44]
add esp, 0x10
mov dword [edx + 0x14], eax
xor edx, edx
test eax, eax
je 0x6040a05d
mov ebx, dword [ebp - 0x44]
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 0x44]
mov ebx, ecx
shl ebx, 4
mov edx, dword [ebp - 0x4c]
mov esi, dword [eax + 0x14]
lea eax, [ebp - 0x3c]
mov dword [esi + ebx], edx
push edx
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.60409410
mov edx, dword [ebp - 0x44]
add esp, 0xc
mov dword [esi + ebx + 4], eax
mov eax, dword [ebp - 0x3c]
mov esi, dword [edx + 0x14]
add edi, eax
mov dword [ebp - 0x68], esi
mov eax, dword [ebp - 0x40]
lea esi, [ebp - 0x3c]
mov ebx, dword [edx + 4]
shl ebx, 4
push esi
push edi
push eax
call fcn.60409410
add esp, 0xc
mov edx, dword [ebp - 0x68]
mov dword [edx + ebx + 8], eax
mov eax, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [ebp - 0x44]
mov edx, dword [eax + 0x14]
mov ebx, dword [eax + 4]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x6c], edx
shl ebx, 4
push esi
push edi
push eax
call fcn.60409410
mov edx, dword [ebp - 0x6c]
mov dword [edx + ebx + 0xc], eax
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebx + 4]
add edi, eax
inc esi
mov dword [ebx + 4], esi
add esp, 0x10
xor edx, edx
test edx, edx
je 0x6040a1a2
cmp edi, dword [ebp - 0x48]
jb 0x6040a16c
jmp 0x6040a164
sub esp, 0xc
push 0x60409d90
call dword [sym.exchndl.dll__bfd_error_handler]
mov dword [esp], 0x10
call sym.exchndl.dll_bfd_set_error
xor edx, edx
jmp 0x6040a05d
dec eax
jne 0x6040a32f
mov esi, dword [ebp - 0x44]
push eax
push eax
mov eax, dword [ebp - 0x5c]
push 1
push eax
mov eax, dword [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x50]
push eax
push esi
call fcn.60409b70
mov ebx, dword [ebp - 0x60]
add esp, 0x20
test ebx, ebx
je 0x6040a382
mov edx, dword [ebp - 0x60]
cmp dword [ebp - 0x50], edx
jae 0x6040a388
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x60], ebx
mov esi, dword [ebp - 0x64]
cmp dword [ebp - 0x50], esi
jbe 0x6040a396
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
push ecx
push edx
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.60409d10
add esp, 0x10
jmp 0x6040a321
push eax
push eax
mov eax, dword [ebp + 8]
push edi
push eax
call fcn.604094e0
mov edx, dword [ebp + 8]
mov dword [ebp - 0x50], eax
xor eax, eax
mov al, byte [edx + 0x40]
add edi, eax
jmp 0x6040a314
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
push ebx
push ebx
push 0
push ecx
push edx
push eax
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x44]
push eax
call fcn.60409b70
mov eax, dword [ebp - 0x60]
add esp, 0x20
test eax, eax
je 0x6040a3fd
mov esi, dword [ebp - 0x60]
cmp dword [ebp - 0x50], esi
jae 0x6040a403
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x60], eax
mov edx, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edx
jbe case.0x6040a1ca.6
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x64], ebx
jmp case.0x6040a1ca.6
lea esi, [ebp - 0x3c]
push eax
xor ebx, ebx
mov eax, dword [ebp - 0x40]
push esi
mov bl, byte [ebp - 0x2c]
push edi
push eax
call fcn.60409410
imul ebx, eax
mov esi, dword [ebp - 0x50]
add esi, ebx
mov dword [ebp - 0x50], esi
mov eax, dword [ebp - 0x3c]
jmp 0x6040a3c7
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
push ebx
push eax
push edi
push ecx
call fcn.60409450
mov edx, dword [ebp - 0x58]
add edx, eax
mov dword [ebp - 0x58], edx
jmp 0x6040a439
lea edx, [ebp - 0x3c]
mov esi, dword [ebp - 0x40]
push eax
push edx
push edi
push esi
call fcn.60409410
pop edx
mov ebx, dword [ebp - 0x3c]
pop ecx
add edi, ebx
push eax
mov eax, dword [ebp - 0x44]
push eax
call fcn.60409c80
mov dword [ebp - 0x54], eax
jmp 0x6040a314
lea ebx, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push ebx
push edi
push eax
call fcn.60409410
mov dword [ebp - 0x5c], eax
jmp 0x6040a439
xor edx, 0xffffffff
xor eax, eax
and edx, 0xff
mov al, byte [ebp - 0x24]
mov esi, eax
xor ecx, ecx
mov eax, edx
mov cl, byte [ebp - 0x2c]
sar edx, 0x1f
idiv esi
imul ecx, eax
mov esi, dword [ebp - 0x50]
add esi, ecx
mov dword [ebp - 0x50], esi
jmp case.0x6040a1ca.6
mov ecx, dword [ebp - 0x40]
push ebx
push ebx
push edi
add edi, 2
push ecx
call fcn.604091b0
mov edx, dword [ebp - 0x50]
add edx, eax
mov dword [ebp - 0x50], edx
jmp 0x6040a314
mov eax, dword [ebp - 0x20]
xor esi, esi
cmp byte [ecx + eax], 0
je case.0x6040a1ca.6
mov ebx, ecx
inc esi
push eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.60409410
add esp, 0x10
mov eax, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [ebp - 0x20]
mov al, byte [ebx + eax]
and eax, 0xff
cmp esi, eax
jl 0x6040a4f1
jmp case.0x6040a1ca.6
sub al, dl
xor ebx, ebx
mov bl, al
mov cl, byte [ebp - 0x24]
mov eax, ebx
xor edx, edx
div cl
mov dl, byte [ebp - 0x2c]
and eax, 0xff
imul eax, edx
mov edx, dword [ebp - 0x50]
and ecx, 0xff
add edx, eax
mov eax, ebx
mov dword [ebp - 0x50], edx
mov ebx, dword [ebp - 0x44]
xor edx, edx
mov esi, dword [ebp - 0x50]
div cx
and edx, 0xff
mov eax, dword [ebp - 0x28]
add edx, eax
mov eax, dword [ebp - 0x58]
add eax, edx
mov dword [ebp - 0x58], eax
push eax
push eax
mov eax, dword [ebp - 0x5c]
push 0
push eax
mov eax, dword [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x54]
push eax
push esi
push ebx
call fcn.60409b70
mov ecx, dword [ebp - 0x60]
add esp, 0x20
test ecx, ecx
je 0x6040a591
mov edx, dword [ebp - 0x60]
cmp dword [ebp - 0x50], edx
jae 0x6040a597
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x60], ebx
mov esi, dword [ebp - 0x64]
cmp dword [ebp - 0x50], esi
jbe case.0x6040a1ca.6
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x64], eax
jmp case.0x6040a1ca.6
push eax
push eax
mov eax, dword [ebp - 0x40]
push edi
push eax
call fcn.604091d0
jmp 0x60409f4b
mov ecx, dword [ebp - 0x40]
push ebx
push ebx
push edi
add edi, 4
push ecx
call fcn.604091d0
mov dword [ebp - 0x38], eax
mov ebx, 8
add esp, 0x10
jmp 0x60409f18
mov esi, dword [ebp - 0x40]
push eax
push eax
push edi
add edi, 8
push esi
call fcn.604091f0
jmp 0x6040a5ce
push ecx
push eax
push edx
push 0x60409dd0
jmp 0x6040a337
push edx
push edx
push 0x60409e20
push eax
call sym.exchndl.dll_bfd_get_section_by_name
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x6040a65d
mov eax, dword [eax + 0x24]
mov dword [esi + 0x24], eax
push eax
push eax
mov eax, dword [ebx + 0x24]
push eax
mov eax, dword [ebp - 0x40]
push eax
call sym.exchndl.dll_bfd_alloc
add esp, 0x10
xor edx, edx
mov dword [esi + 0x20], eax
test eax, eax
je 0x6040a05d
sub esp, 0xc
mov edi, dword [ebx + 0x24]
push edi
push 0
push eax
push ebx
mov ebx, dword [ebp - 0x40]
push ebx
call sym.exchndl.dll_bfd_get_section_contents
add esp, 0x20
xor edx, edx
test eax, eax
jne 0x60409e80
jmp 0x6040a05d
sub esp, 0xc
push 0x60409e30
jmp 0x6040a337