Function at 0x541fb0
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x530]
cmp eax, 0x10
push edi
jg 0x542372
xor edi, edi
cmp eax, edi
jl 0x542372
push ebx
cmp dword [esi + 0x52c], edi
jne 0x542251
cmp dword [esi + 0x528], edi
jne 0x54202e
cmp eax, 0xc
jne 0x54202e
mov eax, dword [esi + 0x518]
mov ecx, dword [esi + 0x51c]
mov edx, dword [esi + 0x520]
mov dword [esi + 0x4f8], eax
mov dword [esi + 0x4fc], ecx
mov dword [esi + 0x500], edx
mov byte [esi + 0x504], 0
mov byte [esi + 0x505], 0
mov byte [esi + 0x506], 0
mov byte [esi + 0x507], 1
jmp 0x5421e8
cmp eax, edi
jbe 0x542051
mov ecx, 0xfffffb18
lea eax, [esi + 0x4e8]
sub ecx, esi
nop
mov dl, byte [eax + 0x30]
xor byte [eax], dl
inc eax
lea edx, [ecx + eax]
cmp edx, dword [esi + 0x530]
jb 0x542040
mov eax, dword [esi + 0x530]
cmp eax, edi
je 0x54207f
push edi
cdq
push 8
push edx
push eax
call fcn.005565d0
add dword [esi + 0x538], eax
lea eax, [esi + 0x4e8]
adc dword [esi + 0x53c], edx
mov edx, esi
call fcn.0053ff60
xor eax, eax
mov dword [esi + 0x518], eax
mov dword [esi + 0x51c], eax
mov al, byte [esi + 0x53d]
movzx ebx, byte [esi + 0x518]
xor byte [esi + 0x4e8], bl
movzx ebx, byte [esi + 0x519]
xor byte [esi + 0x4e9], bl
movzx ebx, byte [esi + 0x51a]
xor byte [esi + 0x4ea], bl
mov byte [esi + 0x522], al
mov al, byte [esi + 0x53c]
movzx ebx, byte [esi + 0x51b]
xor byte [esi + 0x4eb], bl
mov cl, byte [esi + 0x53f]
xor byte [esi + 0x4f0], cl
mov byte [esi + 0x523], al
mov al, byte [esi + 0x53b]
movzx ebx, byte [esi + 0x51c]
mov byte [esi + 0x524], al
mov al, byte [esi + 0x53a]
xor byte [esi + 0x4ec], bl
movzx ebx, byte [esi + 0x51d]
mov byte [esi + 0x525], al
mov al, byte [esi + 0x539]
xor byte [esi + 0x4ed], bl
mov byte [esi + 0x526], al
mov al, byte [esi + 0x538]
movzx ebx, byte [esi + 0x51e]
mov dl, byte [esi + 0x53e]
mov byte [esi + 0x527], al
lea eax, [esi + 0x4e8]
xor byte [esi + 0x4ee], bl
movzx ebx, byte [esi + 0x51f]
xor byte [esi + 0x4f1], dl
xor byte [esi + 0x4ef], bl
mov byte [esi + 0x520], cl
mov cl, byte [esi + 0x53d]
xor byte [esi + 0x4f2], cl
mov cl, byte [esi + 0x53c]
xor byte [esi + 0x4f3], cl
mov cl, byte [esi + 0x53b]
xor byte [esi + 0x4f4], cl
mov cl, byte [esi + 0x53a]
xor byte [esi + 0x4f5], cl
mov cl, byte [esi + 0x539]
xor byte [esi + 0x4f6], cl
mov cl, byte [esi + 0x538]
xor byte [esi + 0x4f7], cl
mov byte [esi + 0x521], dl
mov edx, esi
call fcn.0053ff60
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esi + 0x4f8], ecx
mov ecx, dword [eax + 8]
mov dword [esi + 0x4fc], edx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x500], ecx
mov dword [esi + 0x504], edx
xor edi, edi
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov eax, dword [esi + 0x4f8]
mov ecx, dword [esi + 0x4fc]
mov edx, dword [esi + 0x500]
mov dword [esi + 0x508], eax
mov eax, dword [esi + 0x504]
mov dword [esi + 0x50c], ecx
mov dword [esi + 0x510], edx
mov dword [esi + 0x514], eax
xor eax, eax
mov dword [esi + 0x518], eax
mov dword [esi + 0x51c], eax
mov dword [esi + 0x520], eax
mov dword [esi + 0x524], eax
mov ebx, 1
mov dword [esi + 0x530], edi
mov dword [esi + 0x538], edi
mov dword [esi + 0x53c], edi
mov dword [esi + 0x52c], ebx
jmp 0x542256
mov ebx, 1
cmp dword [esi + 0x52c], ebx
jne 0x54235a
cmp dword [esi + 0x530], 0x10
jge 0x54235a
mov edi, dword [esp + 0x18]
add edi, 0x4c
push ebp
mov ecx, edi
call fcn.00446f60
mov ecx, edi
mov ebp, eax
call fcn.0051d090
xor edi, edi
mov dword [esp + 0x20], eax
cmp dword [esi + 0x530], edi
jne 0x5422ec
mov ebx, eax
and ebx, 0xfffffff0
jbe 0x5422e5
lea eax, [esi + 0x4e8]
mov ecx, dword [edi + ebp]
xor dword [eax], ecx
mov edx, dword [edi + ebp + 4]
xor dword [eax + 4], edx
mov ecx, dword [edi + ebp + 8]
xor dword [esi + 0x4f0], ecx
mov edx, dword [edi + ebp + 0xc]
xor dword [esi + 0x4f4], edx
mov edx, esi
call fcn.0053ff60
add dword [esi + 0x538], 0x80
adc dword [esi + 0x53c], 0
add edi, 0x10
cmp edi, ebx
jb 0x5422a2
mov eax, dword [esp + 0x20]
add ebp, edi
mov ebx, 1
cmp edi, eax
jae 0x542351
sub eax, edi
mov edi, eax
jmp 0x542300
mov eax, dword [esi + 0x530]
mov cl, byte [ebp]
xor byte [esi + eax + 0x4e8], cl
add dword [esi + 0x530], ebx
lea eax, [esi + eax + 0x4e8]
add ebp, ebx
cmp dword [esi + 0x530], 0x10
jne 0x54234d
lea eax, [esi + 0x4e8]
mov edx, esi
call fcn.0053ff60
xor eax, eax
add dword [esi + 0x538], 0x80
mov dword [esi + 0x530], eax
adc dword [esi + 0x53c], eax
sub edi, ebx
jne 0x542300
pop ebp
pop ebx
pop edi
mov al, 1
pop esi
ret 0x10
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Internal_error_2
call eax
pop ebx
pop edi
xor al, al
pop esi
ret 0x10
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Internal_error.
call eax
pop edi
xor al, al
pop esi
ret 0x10