Function at 0x40b993
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esp], 0x10
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
call sym._malloc
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x3c]
or eax, dword [ebp - 0x40]
je 0x40bbaa
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
mov dword [ebp - 0x4c], edx
mov edx, dword [ebx + 0xc]
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x54], edx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x48], eax
xor eax, eax
xor esi, esi
mov edi, 0xf
cmp edi, dword [ebp - 0x48]
sbb esi, dword [ebp - 0x44]
jae 0x40bac2
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
xor edx, edx
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp + 0x1c]
mov edi, ecx
shrd ecx, ebx, 8
shrd ebx, edi, 8
mov edi, dword [esi + edx*8]
add ecx, dword [ebp - 0x30]
adc ebx, dword [ebp - 0x2c]
xor edi, ecx
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x20], edi
mov edi, dword [esi + edx*8 + 4]
inc edx
xor edi, ebx
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
mov edi, ecx
shld ecx, ebx, 3
shld ebx, edi, 3
mov edi, dword [ebp - 0x20]
xor edi, ecx
mov dword [ebp - 0x30], edi
mov edi, dword [ebp - 0x1c]
xor edi, ebx
mov dword [ebp - 0x2c], edi
cmp edx, 0x20
jne 0x40ba24
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
xor edx, dword [edi + eax + 8]
xor ecx, dword [edi + eax + 0xc]
mov edi, dword [ebp + 8]
mov dword [edi + eax + 8], edx
mov edx, dword [ebp - 0x30]
mov dword [edi + eax + 0xc], ecx
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x2c]
xor edx, dword [edi + eax]
xor ecx, dword [edi + eax + 4]
mov edi, dword [ebp + 8]
add dword [ebp - 0x48], 0xfffffff0
adc dword [ebp - 0x44], 0xffffffff
mov dword [edi + eax], edx
add dword [ebp - 0x58], 1
mov dword [edi + eax + 4], ecx
adc dword [ebp - 0x54], 0
add eax, 0x10
jmp 0x40b9f7
mov ecx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
mov eax, 0xfffffff0
mov esi, dword [ebp - 0x50]
mov edi, dword [ebp - 0x4c]
shrd ecx, ebx, 4
shr ebx, 4
add esi, ecx
mov dword [ebp - 0x20], ecx
adc edi, ebx
mul dword [ebp - 0x20]
mov dword [ebp - 0x1c], ebx
imul ebx, dword [ebp - 0x1c], 0xfffffff0
sub ebx, dword [ebp - 0x20]
add edx, ebx
add eax, dword [ebp - 0x40]
adc edx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edx
add eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x2c]
or eax, dword [ebp - 0x30]
je 0x40bbaa
xor eax, eax
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x24]
mov edx, ecx
shrd ecx, ebx, 8
shrd ebx, edx, 8
add ecx, esi
adc ebx, edi
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp + 0x1c]
xor edx, dword [ebx + eax*8]
mov ecx, ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
xor ebx, dword [ecx + eax*8 + 4]
mov ecx, esi
inc eax
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
shld ecx, edi, 3
mov ebx, edi
shld ebx, esi, 3
xor ebx, dword [ebp - 0x24]
xor edx, ecx
mov edi, ebx
mov esi, edx
cmp eax, 0x20
jne 0x40bb12
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x24]
xor ecx, ecx
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0xc], edx
mov edx, dword [ebp - 0x40]
mov dword [ebx + 4], edi
mov edi, dword [ebp + 8]
shl edx, 3
mov dword [ebx + 8], eax
add edi, edx
add edx, dword [ebp + 0xc]
mov dword [ebx], esi
xor ebx, ebx
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x34]
mov al, byte [eax + ecx]
xor al, byte [edx + ecx]
mov byte [edi + ecx], al
add ecx, 1
adc ebx, 0
cmp ebx, dword [ebp - 0x2c]
jne 0x40bb8b
cmp ecx, dword [ebp - 0x30]
jne 0x40bb8b
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._free
add esp, 0x5c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret