Function at 0x3d84d6b
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebp, ecx
mov edi, dword [esp + 0x40]
add dword [ecx + 0x38], edi
mov ecx, dword [ecx + 0x3c]
test ecx, ecx
mov dword [esp + 0x1c], edx
je 0x3d84dad
mov esi, 8
sub esi, ecx
cmp edi, esi
mov eax, esi
cmovb eax, edi
cmp eax, 4
mov dword [esp + 0x14], ecx
jb 0x3d84db4
mov edi, dword [edx]
mov dword [esp], 0
mov ebx, 4
jmp 0x3d84dbf
xor esi, esi
jmp 0x3d84f33
xor edi, edi
mov dword [esp], 0
xor ebx, ebx
mov ecx, ebx
or ecx, 1
cmp ecx, eax
mov dword [esp + 8], esi
jae 0x3d84df8
movzx edx, word [edx + ebx]
lea ecx, [ebx*8]
xor esi, esi
shld esi, edx, cl
shl edx, cl
test cl, 0x20
cmovne esi, edx
mov ecx, 0
cmovne edx, ecx
or dword [esp], esi
mov esi, dword [esp + 8]
or edi, edx
or ebx, 2
cmp ebx, eax
jae 0x3d84e28
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + ebx]
shl ebx, 3
xor edx, edx
mov ecx, ebx
shld edx, eax, cl
shl eax, cl
xor ecx, ecx
test bl, 0x20
cmovne edx, eax
cmovne eax, ecx
mov ebx, dword [esp]
or ebx, edx
or edi, eax
mov eax, dword [esp + 0x14]
jmp 0x3d84e2f
mov eax, dword [esp + 0x14]
mov ebx, dword [esp]
lea ecx, [eax*8]
shld ebx, edi, cl
shl edi, cl
xor edx, edx
test cl, 0x20
cmovne ebx, edi
cmove edx, edi
or ebx, dword [ebp + 0x34]
or edx, dword [ebp + 0x30]
mov dword [ebp + 0x30], edx
mov dword [ebp + 0x34], ebx
mov ecx, dword [esp + 0x40]
cmp esi, ecx
jbe 0x3d84e63
add eax, ecx
mov ecx, eax
jmp 0x3d8510b
mov eax, dword [ebp + 0x1c]
xor eax, ebx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x18]
xor eax, edx
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp]
add edi, ecx
mov dword [esp + 4], edi
mov edi, dword [ebp + 4]
adc edi, esi
mov dword [esp + 0x18], edi
mov edi, ecx
shld edi, esi, 0xd
shld esi, ecx, 0xd
xor esi, dword [esp + 0x18]
xor edi, dword [esp + 4]
mov ecx, dword [ebp + 8]
mov dword [esp + 0xc], ecx
add dword [esp + 0xc], eax
mov dword [esp], ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [esp + 0x20]
adc ebx, ecx
mov dword [esp + 0x10], ebp
mov ebp, eax
shld ebp, ecx, 0x10
shrd eax, ecx, 0x10
xor eax, ebx
xor ebp, dword [esp + 0xc]
add dword [esp + 0x18], ebp
adc dword [esp + 4], eax
mov ecx, ebp
shld ecx, eax, 0x15
shrd ebp, eax, 0xb
xor ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov dword [eax + 0x18], ecx
xor ebp, dword [esp + 4]
mov ecx, dword [esp + 0xc]
add ecx, edi
adc ebx, esi
mov eax, dword [esp + 0x10]
mov dword [eax + 0x1c], ebp
mov ebp, dword [esp + 0x10]
mov eax, edi
shld eax, esi, 0x11
shrd edi, esi, 0xf
mov esi, dword [esp + 8]
xor eax, ecx
mov dword [ebp + 0x10], eax
xor edi, ebx
mov dword [ebp + 0x14], edi
mov edi, dword [esp + 0x40]
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], ebx
mov eax, dword [esp + 4]
xor eax, dword [esp]
mov ecx, dword [esp + 0x18]
xor ecx, edx
mov dword [ebp], ecx
mov dword [ebp + 4], eax
mov edx, dword [esp + 0x1c]
sub edi, esi
mov eax, edi
and eax, 7
and edi, 0xfffffff8
cmp esi, edi
mov dword [esp + 0x14], eax
jae 0x3d8506f
mov ecx, dword [ebp]
mov dword [esp + 0x10], ebp
mov dword [esp + 8], esi
mov esi, dword [ebp + 4]
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x24], edi
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov ebp, dword [esp + 0x10]
mov ebp, dword [ebp + 0xc]
mov dword [esp], ebp
mov ebp, dword [esp + 0x10]
mov ebp, dword [ebp + 8]
mov dword [esp + 4], ebp
mov dword [esp + 0xc], esi
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 8]
mov ebp, dword [ebp + esi + 4]
mov dword [esp + 0x18], ebp
xor ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 8]
mov ebp, dword [ebp + esi]
mov dword [esp + 0x20], ebp
xor eax, ebp
add ecx, edx
mov esi, dword [esp + 0xc]
adc esi, edi
mov ebp, edx
shld ebp, edi, 0xd
shld edi, edx, 0xd
xor edi, esi
xor ebp, ecx
mov dword [esp + 0x28], ebp
mov edx, dword [esp + 4]
add edx, eax
mov ebp, dword [esp]
adc ebp, ebx
mov dword [esp + 0xc], ebp
mov ebp, eax
shld ebp, ebx, 0x10
shrd eax, ebx, 0x10
xor eax, dword [esp + 0xc]
xor ebp, edx
add esi, ebp
mov dword [esp + 4], esi
adc ecx, eax
mov esi, ebp
shld esi, eax, 0x15
shrd ebp, eax, 0xb
mov ebx, ebp
xor ebx, ecx
mov eax, esi
xor eax, dword [esp + 4]
mov esi, dword [esp + 0x28]
add edx, esi
mov dword [esp], edx
mov ebp, dword [esp + 0xc]
adc ebp, edi
mov edx, esi
shld edx, edi, 0x11
shld edi, esi, 0x11
mov esi, ecx
xor esi, dword [esp + 0x18]
mov ecx, dword [esp + 4]
xor ecx, dword [esp + 0x20]
mov dword [esp + 4], ebp
xor edi, ebp
xor edx, dword [esp]
mov ebp, dword [esp + 8]
add ebp, 8
mov dword [esp + 8], ebp
cmp ebp, dword [esp + 0x24]
jb 0x3d84f7c
mov ebp, dword [esp + 0x10]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x14], edi
mov eax, dword [esp + 4]
mov dword [ebp + 8], eax
mov eax, dword [esp]
mov dword [ebp + 0xc], eax
mov dword [ebp], ecx
mov dword [ebp + 4], esi
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x14]
cmp eax, 4
jb 0x3d85083
mov eax, dword [edx + esi]
mov dword [esp], eax
xor edi, edi
mov ebx, 4
jmp 0x3d8508e
mov dword [esp], 0
xor edi, edi
xor ebx, ebx
mov ecx, ebx
or ecx, 1
mov eax, dword [esp + 0x14]
cmp ecx, eax
mov dword [esp + 8], esi
jae 0x3d850cf
lea ecx, [ebx + esi]
movzx edx, word [edx + ecx]
lea ecx, [ebx*8]
xor esi, esi
shld esi, edx, cl
xor eax, eax
shl edx, cl
test cl, 0x20
mov ecx, dword [esp + 0x14]
cmovne esi, edx
cmovne edx, eax
or edi, esi
mov eax, dword [esp]
or eax, edx
or ebx, 2
jmp 0x3d850d4
mov ecx, eax
mov eax, dword [esp]
cmp ebx, ecx
jae 0x3d85105
mov edx, dword [esp + 8]
add edx, ebx
mov ecx, dword [esp + 0x1c]
movzx edx, byte [ecx + edx]
shl ebx, 3
xor esi, esi
mov ecx, ebx
shld esi, edx, cl
shl edx, cl
xor ecx, ecx
test bl, 0x20
cmovne esi, edx
cmovne edx, ecx
mov ecx, dword [esp + 0x14]
or edi, esi
or eax, edx
mov dword [ebp + 0x30], eax
mov dword [ebp + 0x34], edi
mov dword [ebp + 0x3c], ecx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret