Function at 0x5b89b0
Capabilities:
Access peb ldr_data
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x6549fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push esi
push edi
lea ecx, [esp + 0xc]
call fcn.004f0420
mov ebx, dword [esp + 0x150]
mov dword [esp + 0x140], 0
lea edi, [ebx + 0x30]
mov ecx, edi
call fcn.005a8750
test eax, eax
jne 0x5b8a08
push 0x10
push eax
mov ecx, edi
call fcn.004e0ed0
mov dword [ebx + 0x2c], 0xc
mov esi, dword [esp + 0x14c]
mov eax, dword [esi + 0x534]
test eax, eax
je 0x5b8a2c
mov ecx, dword [esp + 0x154]
push str.Not_in_IV_mode.
mov eax, dword [ecx]
jmp 0x5b8ce5
mov eax, dword [esi + 0x538]
cmp eax, 0x10
jge 0x5b8cd7
test eax, eax
jl 0x5b8cd7
mov ecx, dword [ebx + 0x2c]
add ecx, eax
cmp ecx, 0xc
jbe 0x5b8a5b
mov eax, dword [esi + 0x530]
or al, 1
mov dword [esi + 0x530], eax
push ebp
mov ecx, edi
call fcn.004dda10
mov ebp, eax
mov eax, dword [esi + 0x538]
xor edi, edi
test eax, eax
jne 0x5b8b09
test dword [ebx + 0x2c], 0xfffffff0
jbe 0x5b8b07
lea ebx, [esi + 0x4f0]
mov edx, dword [edi + ebp]
mov eax, dword [ebx]
xor eax, edx
mov dword [ebx], eax
mov eax, dword [edi + ebp + 4]
mov ecx, dword [ebx + 4]
xor ecx, eax
mov dword [ebx + 4], ecx
mov ecx, dword [edi + ebp + 8]
mov edx, dword [esi + 0x4f8]
xor edx, ecx
mov dword [esi + 0x4f8], edx
mov edx, dword [edi + ebp + 0xc]
mov eax, dword [esi + 0x4fc]
xor eax, edx
mov dword [esi + 0x4fc], eax
lea eax, [esp + 0x10]
push eax
push ebx
push esi
call fcn.005b8d20
mov ecx, dword [esi + 0x540]
add esp, 0xc
add ecx, 0x80
mov dword [esi + 0x540], ecx
mov eax, dword [esi + 0x544]
mov ecx, dword [esp + 0x154]
adc eax, 0
add edi, 0x10
mov dword [esi + 0x544], eax
mov edx, dword [ecx + 0x2c]
and edx, 0xfffffff0
cmp edi, edx
jb 0x5b8a88
mov ebx, ecx
add ebp, edi
cmp edi, dword [ebx + 0x2c]
jae 0x5b8cbe
mov eax, dword [esi + 0x538]
mov cl, byte [ebp]
mov byte [eax + esi + 0x520], cl
mov eax, dword [esi + 0x538]
inc eax
inc ebp
cmp eax, 0x10
mov dword [esi + 0x538], eax
jne 0x5b8cb2
mov dl, byte [esi + 0x520]
mov cl, byte [esi + 0x4f0]
lea eax, [esi + 0x4f0]
xor cl, dl
mov dl, byte [esi + 0x4f1]
mov byte [eax], cl
mov cl, byte [esi + 0x521]
xor dl, cl
mov cl, byte [esi + 0x4f2]
mov byte [esi + 0x4f1], dl
mov dl, byte [esi + 0x522]
xor cl, dl
mov dl, byte [esi + 0x4f3]
mov byte [esi + 0x4f2], cl
mov cl, byte [esi + 0x523]
xor dl, cl
mov cl, byte [esi + 0x4f4]
mov byte [esi + 0x4f3], dl
mov dl, byte [esi + 0x524]
xor cl, dl
mov dl, byte [esi + 0x4f5]
mov byte [esi + 0x4f4], cl
mov cl, byte [esi + 0x525]
xor dl, cl
mov cl, byte [esi + 0x4f6]
mov byte [esi + 0x4f5], dl
mov dl, byte [esi + 0x526]
xor cl, dl
mov dl, byte [esi + 0x4f7]
mov byte [esi + 0x4f6], cl
mov cl, byte [esi + 0x527]
xor dl, cl
mov cl, byte [esi + 0x4f8]
mov byte [esi + 0x4f7], dl
mov dl, byte [esi + 0x528]
xor cl, dl
mov dl, byte [esi + 0x4f9]
mov byte [esi + 0x4f8], cl
mov cl, byte [esi + 0x529]
xor dl, cl
mov cl, byte [esi + 0x4fa]
mov byte [esi + 0x4f9], dl
mov dl, byte [esi + 0x52a]
xor cl, dl
mov dl, byte [esi + 0x4fb]
mov byte [esi + 0x4fa], cl
mov cl, byte [esi + 0x52b]
xor dl, cl
mov cl, byte [esi + 0x4fc]
mov byte [esi + 0x4fb], dl
mov dl, byte [esi + 0x52c]
xor cl, dl
mov dl, byte [esi + 0x4fd]
mov byte [esi + 0x4fc], cl
mov cl, byte [esi + 0x52d]
xor dl, cl
mov cl, byte [esi + 0x4fe]
mov byte [esi + 0x4fd], dl
mov dl, byte [esi + 0x52e]
xor cl, dl
mov dl, byte [esi + 0x4ff]
mov byte [esi + 0x4fe], cl
mov cl, byte [esi + 0x52f]
xor dl, cl
mov byte [esi + 0x4ff], dl
lea edx, [esp + 0x10]
push edx
push eax
push esi
call fcn.005b8d20
xor eax, eax
add esp, 0xc
mov dword [esi + 0x538], eax
mov edx, dword [esi + 0x540]
add edx, 0x80
mov dword [esi + 0x540], edx
mov ecx, dword [esi + 0x544]
adc ecx, eax
mov dword [esi + 0x544], ecx
mov eax, dword [ebx + 0x2c]
inc edi
cmp edi, eax
jb 0x5b8b12
lea ecx, [esp + 0x10]
mov dword [esp + 0x144], 0xffffffff
call fcn.004f0460
mov al, 1
pop ebp
jmp 0x5b8cfe
mov ecx, dword [esp + 0x154]
push str.buflen_error.
mov eax, dword [ecx]
call dword [eax + 0x14]
lea ecx, [esp + 0xc]
mov dword [esp + 0x140], 0xffffffff
call fcn.004f0460
xor al, al
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x138
ret 0x10