Function at 0x6b594f20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], eax
mov ebx, eax
shr ebx, 4
mov ecx, dword [edi + 0x50]
mov eax, ecx
add eax, ebx
mov dword [esp + 0x18], eax
mov esi, dword [edi + 0x54]
mov edx, esi
adc esi, 0
mov dword [esp + 0x14], ebx
test ebx, ebx
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x24], eax
je 0x6b594fbc
test esi, esi
jne 0x6b594fbc
cmp dword [edi + 0x10], 0
je 0x6b594fbc
mov ecx, dword [esp + 0x18]
shr ecx, 1
mov edx, 0x20
mov eax, 0x20
je 0x6b594f82
bsr eax, ecx
xor eax, 0x1f
sub edx, eax
mov ecx, edi
call fcn.6b594a50
test eax, eax
je 0x6b5951f6
mov eax, dword [edi + 0x50]
inc eax
lea ecx, [edi + 0x78]
lea edx, [edi + 0x88]
push edx
push dword [edi + 0x40]
push ecx
push eax
push dword [edi + 0xc]
push dword [esp + 0x28]
push dword [ebp + 0x10]
push ebx
call dword [edi + 0x10]
add esp, 0x20
jmp 0x6b595139
add ecx, 1
adc edx, 0
cmp dword [esp + 0x18], ecx
mov eax, esi
mov dword [esp + 0x14], edx
sbb eax, edx
jb 0x6b595139
mov dword [esp + 0x1c], esi
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + 0x30], ebx
xor edx, edx
mov dword [esp + 0x2c], ecx
test cl, 1
jne 0x6b595010
xor edx, edx
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
nop
nop
nop
mov ecx, eax
shld ecx, ebx, 0x1f
shr eax, 1
inc edx
test bl, 2
mov ebx, ecx
je 0x6b595000
mov ecx, edi
call fcn.6b594a50
test eax, eax
je 0x6b5951f6
mov esi, dword [eax]
mov edx, dword [eax + 4]
xor esi, dword [edi + 0x78]
xor edx, dword [edi + 0x7c]
mov dword [edi + 0x7c], edx
mov dword [edi + 0x78], esi
mov ebx, dword [eax + 0xc]
mov eax, dword [eax + 8]
xor eax, dword [edi + 0x80]
xor ebx, dword [edi + 0x84]
mov dword [edi + 0x84], ebx
mov dword [edi + 0x80], eax
mov ecx, dword [esp + 0x30]
mov edi, dword [ecx]
mov dword [esp + 0x20], edi
mov edi, dword [ecx + 4]
mov dword [esp + 4], edi
xor edx, edi
mov edi, dword [esp + 0x20]
mov dword [esp], edi
xor esi, edi
mov edi, dword [ecx + 0xc]
mov dword [esp + 0x20], edi
mov dword [esp + 0xc], edi
mov edi, dword [ecx + 8]
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], edx
xor eax, edi
mov edi, dword [ebp + 8]
xor ebx, dword [esp + 0x20]
mov dword [esp + 0xc], ebx
mov ebx, ecx
mov dword [esp + 8], eax
add ebx, 0x10
push dword [edi + 0xc]
lea eax, [esp + 4]
push eax
push eax
call dword [edi + 4]
add esp, 0xc
mov eax, dword [esp]
mov ecx, dword [esp + 4]
xor ecx, dword [edi + 0x7c]
xor eax, dword [edi + 0x78]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 8]
xor esi, dword [edi + 0x80]
xor edx, dword [edi + 0x84]
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
xor dword [edi + 0x8c], ecx
xor dword [edi + 0x88], eax
xor dword [edi + 0x94], edx
xor dword [edi + 0x90], esi
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x24]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp]
mov edx, dword [esp + 8]
mov dword [esi + 8], edx
mov dword [esi + 4], eax
mov dword [esi], ecx
add esi, 0x10
mov dword [esp + 0x24], esi
mov ecx, dword [esp + 0x2c]
add ecx, 1
mov edx, dword [esp + 0x14]
adc edx, 0
cmp dword [esp + 0x18], ecx
mov esi, dword [esp + 0x1c]
mov eax, esi
mov dword [esp + 0x14], edx
sbb eax, edx
jae 0x6b594fe0
and dword [esp + 0x28], 0xf
je 0x6b5951e5
mov dword [esp + 0x1c], esi
lea eax, [edi + 0x78]
mov ecx, dword [edi + 0x24]
mov edx, dword [edi + 8]
mov esi, dword [edi + 0x20]
xor dword [edi + 0x78], esi
xor dword [edi + 0x7c], ecx
mov ecx, dword [edi + 0x2c]
mov esi, dword [edi + 0x28]
xor dword [edi + 0x80], esi
xor dword [edi + 0x84], ecx
mov ecx, esp
push edx
push ecx
push eax
call dword [edi]
add esp, 0xc
xor eax, eax
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
movzx ecx, byte [esp + eax]
xor cl, byte [ebx + eax]
mov byte [edx + eax], cl
inc eax
cmp esi, eax
jne 0x6b595180
mov eax, 0x10
sub eax, esi
lea ecx, [esp + esi]
push eax
push 0
push ecx
mov ebx, edx
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
push ebx
lea eax, [esp + 8]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov byte [esp + esi], pe_nt_image_headers32
mov eax, dword [esp]
mov ecx, dword [esp + 4]
xor dword [edi + 0x88], eax
xor dword [edi + 0x8c], ecx
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
xor dword [edi + 0x94], ecx
xor dword [edi + 0x90], eax
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], esi
mov eax, 1
jmp 0x6b5951f8
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret