Function at 0x55da0c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff30
push ebx
push esi
push edi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], 0x6d71bc
mov dword [ebp - 0x20], esp
mov eax, 0x56498f
mov dword [ebp - 0x28], eax
xor edx, edx
mov word [ebp - 0x1c], 0
mov dword [ebp - 0x10], edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x2c], ecx
lea eax, [ebp - 0x2c]
mov dword fs:[0], eax
cmp byte [ebp + 8], 0
je 0x55da9b
mov word [ebp - 0x1c], 8
mov eax, str.TLG_cannot_be_used_as_universal_transition_rule__province__p__or_mask__m__images.
call fcn.00408c54
mov dword [ebp - 4], eax
inc dword [ebp - 0x10]
lea edx, [ebp - 4]
cmp dword [0x7bff38], 0
je 0x55da80
mov eax, dword [0x7bff38]
jmp 0x55da85
mov eax, dword [0x7bff34]
call fcn.006689e0
dec dword [ebp - 0x10]
cmp dword [ebp - 4], 0
je 0x55da9b
mov eax, dword [ebp - 4]
call fcn.00408920
lea edx, [ebp - 0xb0]
mov ecx, 1
mov eax, dword [ebp + 0x10]
call fcn.004386a4
xor edx, edx
mov dl, byte [ebp - 0xb0]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp + 0x10]
call fcn.00438730
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x10]
call fcn.00438730
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x10]
call fcn.00438730
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x44], 3
je 0x55db2a
cmp dword [ebp - 0x44], 4
je 0x55db2a
mov word [ebp - 0x1c], 0x20
mov eax, str.Unsupported_color_type.
call fcn.00408c54
mov dword [ebp - 8], eax
inc dword [ebp - 0x10]
lea edx, [ebp - 8]
cmp dword [0x7bff38], 0
je 0x55db0f
mov eax, dword [0x7bff38]
jmp 0x55db14
mov eax, dword [0x7bff34]
call fcn.006689e0
dec dword [ebp - 0x10]
cmp dword [ebp - 8], 0
je 0x55db2a
mov eax, dword [ebp - 8]
call fcn.00408920
mov eax, dword [ebp - 0x40]
dec eax
cdq
idiv dword [ebp - 0x48]
inc eax
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x10]
call fcn.00438654
push edx
push eax
mov eax, dword [ebp - 0x4c]
shl eax, 2
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp + 0x10]
call fcn.00438664
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x34]
call dword [ebp - 0x38]
xor edx, edx
mov dword [ebp - 0x50], edx
xor ecx, ecx
mov dword [ebp - 0x54], ecx
xor eax, eax
mov dword [ebp - 0x58], eax
xor edx, edx
mov dword [ebp - 0x5c], edx
lea ebx, [ebp - 0xc0]
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x44]
jge 0x55db9c
xor edx, edx
mov dword [ebx], edx
inc dword [ebp - 0x5c]
add ebx, 4
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x44]
jl 0x55db8a
mov word [ebp - 0x1c], 0x38
mov edx, 4
mov eax, 0x1000
call fcn.0047c640
mov dword [ebp - 0x54], eax
push 0x1000
push 0
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.0056420c
add esp, 0xc
mov eax, dword [ebp - 0x48]
imul dword [ebp - 0x3c]
add eax, 0xa
mov edx, 4
call fcn.0047c640
mov dword [ebp - 0x50], eax
xor ecx, ecx
mov dword [ebp - 0x60], ecx
mov word [ebp - 0x1c], 0x38
lea ebx, [ebp - 0xc0]
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0x44]
jge 0x55dc19
mov eax, dword [ebp - 0x48]
imul dword [ebp - 0x3c]
add eax, 0xa
mov edx, 4
call fcn.0047c640
mov dword [ebx], eax
inc dword [ebp - 0x60]
add ebx, 4
mov ecx, dword [ebp - 0x60]
cmp ecx, dword [ebp - 0x44]
jl 0x55dbf6
xor eax, eax
mov dword [ebp - 0x64], eax
mov word [ebp - 0x1c], 0x38
xor edx, edx
mov dword [ebp - 0x68], edx
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [ebp - 0x40]
jge 0x55df67
mov word [ebp - 0x1c], 0x38
xor edi, edi
lea ebx, [ebp - 0xc0]
cmp edi, dword [ebp - 0x44]
jge 0x55dcae
lea edx, [ebp - 0xb0]
mov ecx, 1
mov eax, dword [ebp + 0x10]
call fcn.004386a4
mov eax, dword [ebp + 0x10]
call fcn.00438730
cmp byte [ebp - 0xb0], 0
mov esi, eax
jne 0x55dc99
mov ecx, esi
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp + 0x10]
call fcn.004386a4
mov eax, dword [ebp - 0x58]
push eax
mov edx, dword [ebp - 0x54]
push edx
push esi
mov ecx, dword [ebp - 0x50]
push ecx
mov eax, dword [ebx]
push eax
call dword [0x7aea98]
add esp, 0x14
mov dword [ebp - 0x58], eax
jmp 0x55dca5
mov edx, dword [ebx]
mov ecx, esi
mov eax, dword [ebp + 0x10]
call fcn.004386a4
inc edi
add ebx, 4
cmp edi, dword [ebp - 0x44]
jl 0x55dc48
mov edx, dword [ebp - 0x68]
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x6c], edx
mov word [ebp - 0x1c], 0x38
mov ecx, dword [ebp - 0x6c]
cmp ecx, dword [ebp - 0x40]
jle 0x55dccb
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x6c], eax
xor edx, edx
lea eax, [ebp - 0xd0]
lea ebx, [ebp - 0xc0]
cmp edx, dword [ebp - 0x44]
jge 0x55dcee
mov ecx, dword [ebx]
mov dword [eax], ecx
inc edx
add eax, 4
add ebx, 4
cmp edx, dword [ebp - 0x44]
jl 0x55dcde
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x70], eax
mov word [ebp - 0x1c], 0x38
mov edx, dword [ebp - 0x70]
cmp edx, dword [ebp - 0x6c]
jge 0x55df55
mov edx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x34]
call dword [ebp + 0x14]
mov word [ebp - 0x1c], 0x38
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x64], 0
je 0x55ddad
mov ecx, dword [ebp - 0x44]
sub ecx, 3
je 0x55dd32
dec ecx
je 0x55dd6b
jmp 0x55df37
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0xd0]
push edx
push ecx
mov edx, dword [ebp - 0x64]
push edx
push eax
call dword [0x7aea90]
add esp, 0x10
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0x3c]
add dword [ebp - 0xcc], ecx
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xc8], eax
jmp 0x55df37
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0xd0]
push edx
push ecx
mov edx, dword [ebp - 0x64]
push edx
push eax
call dword [0x7aea94]
add esp, 0x10
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0x3c]
add dword [ebp - 0xcc], ecx
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xc8], eax
mov edx, dword [ebp - 0x3c]
add dword [ebp - 0xc4], edx
jmp 0x55df37
mov ecx, dword [ebp - 0x44]
sub ecx, 3
je 0x55ddc1
dec ecx
je 0x55de54
jmp 0x55df37
xor edx, edx
mov dword [ebp - 0x78], edx
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
xor edx, edx
mov dword [ebp - 0x80], edx
xor edx, edx
cmp edx, dword [ebp - 0x3c]
jge 0x55de34
mov ecx, dword [ebp - 0xd0]
movzx ecx, byte [ecx + edx]
mov word [ebp - 0x1c], 0x38
mov ebx, dword [ebp - 0xcc]
movzx esi, byte [ebx + edx]
mov ebx, dword [ebp - 0xc8]
movzx ebx, byte [ebx + edx]
mov dword [ebp - 0x84], ebx
add ecx, esi
add dword [ebp - 0x84], esi
add dword [ebp - 0x80], ecx
mov cl, byte [ebp - 0x80]
mov byte [eax], cl
inc eax
add dword [ebp - 0x7c], esi
mov cl, byte [ebp - 0x7c]
mov byte [eax], cl
inc eax
mov ecx, dword [ebp - 0x84]
add dword [ebp - 0x78], ecx
mov cl, byte [ebp - 0x78]
mov byte [eax], cl
inc eax
mov byte [eax], 0xff
inc eax
inc edx
cmp edx, dword [ebp - 0x3c]
jl 0x55ddd7
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xd0], eax
mov edx, dword [ebp - 0x3c]
add dword [ebp - 0xcc], edx
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xc8], eax
jmp 0x55df37
xor edx, edx
mov dword [ebp - 0x88], edx
xor ecx, ecx
mov dword [ebp - 0x8c], ecx
xor edx, edx
mov dword [ebp - 0x90], edx
xor ecx, ecx
mov dword [ebp - 0x94], ecx
xor edx, edx
cmp edx, dword [ebp - 0x3c]
jge 0x55df13
mov ecx, dword [ebp - 0xd0]
movzx ecx, byte [ecx + edx]
mov word [ebp - 0x1c], 0x38
mov ebx, dword [ebp - 0xcc]
movzx esi, byte [ebx + edx]
mov ebx, dword [ebp - 0xc8]
movzx ebx, byte [ebx + edx]
mov dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0xc4]
movzx ebx, byte [ebx + edx]
mov dword [ebp - 0x9c], ebx
add ecx, esi
add dword [ebp - 0x98], esi
add dword [ebp - 0x90], ecx
mov cl, byte [ebp - 0x90]
mov byte [eax], cl
inc eax
add dword [ebp - 0x8c], esi
mov cl, byte [ebp - 0x8c]
mov byte [eax], cl
inc eax
mov ecx, dword [ebp - 0x98]
add dword [ebp - 0x88], ecx
mov cl, byte [ebp - 0x88]
mov byte [eax], cl
inc eax
mov ecx, dword [ebp - 0x9c]
add dword [ebp - 0x94], ecx
mov cl, byte [ebp - 0x94]
mov byte [eax], cl
inc eax
inc edx
cmp edx, dword [ebp - 0x3c]
jl 0x55de7f
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xd0], eax
mov edx, dword [ebp - 0x3c]
add dword [ebp - 0xcc], edx
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0xc8], eax
mov edx, dword [ebp - 0x3c]
add dword [ebp - 0xc4], edx
or edx, 0xffffffff
mov eax, dword [ebp - 0x34]
call dword [ebp + 0x14]
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0x64], ecx
inc dword [ebp - 0x70]
mov eax, dword [ebp - 0x70]
cmp eax, dword [ebp - 0x6c]
jl 0x55dd06
mov edx, dword [ebp - 0x48]
add dword [ebp - 0x68], edx
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [ebp - 0x40]
jl 0x55dc35
mov word [ebp - 0x1c], 0
jmp 0x55dfe1
cmp dword [ebp - 0x50], 0
je 0x55dfef
mov eax, dword [ebp - 0x50]
call fcn.0047c680
cmp dword [ebp - 0x54], 0
je 0x55dffd
mov eax, dword [ebp - 0x54]
call fcn.0047c680
xor edx, edx
mov dword [ebp - 0xa4], edx
mov ecx, dword [ebp - 0xa4]
cmp ecx, dword [ebp - 0x44]
jge 0x55e043
mov eax, dword [ebp - 0xa4]
cmp dword [ebp + eax*4 - 0xc0], 0
je 0x55e032
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp + edx*4 - 0xc0]
call fcn.0047c680
inc dword [ebp - 0xa4]
mov edx, dword [ebp - 0xa4]
cmp edx, dword [ebp - 0x44]
jl 0x55e010
mov ecx, dword [ebp - 0x2c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10