Function at 0x70454540
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 0x2c], eax
movzx eax, byte [esp + 0x50]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x20], al
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x704548a9
mov ebx, dword [edx]
mov dword [esp + 0x18], ebx
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x70454891
mov eax, dword [esp + 0x14]
movzx ecx, byte [eax]
test cl, cl
je 0x70454891
mov ebp, eax
xor esi, esi
xor edi, edi
lea esi, [esi]
lea edi, [edi]
movsx ecx, cl
mov ebx, ecx
sar ebx, 0x1f
add ecx, esi
adc ebx, edi
mov eax, ecx
mov edx, ebx
inc ebp
shld edx, eax, 0xa
shl eax, 0xa
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shrd ecx, ebx, 8
mov esi, ecx
movzx ecx, byte [ebp]
shr ebx, 8
xor esi, eax
mov edi, ebx
xor edi, edx
test cl, cl
jne 0x704545a0
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 4], edi
cdq
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call fcn.704592c0
lea ebp, [eax*4]
mov dword [esp], 0xc
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x14]
mov dword [esp], edx
mov esi, eax
call fcn.704593d0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
cmp byte [esp + 0x20], 0
mov dword [esi + 4], ecx
mov dword [esi], eax
mov eax, dword [ebx + 4]
mov edi, dword [eax + ebp]
mov dword [esi + 8], edi
mov dword [eax + ebp], esi
je 0x70454857
mov edx, dword [esi + 8]
test edx, edx
je 0x70454857
mov ecx, 1
lea esi, [esi]
lea edi, [edi]
mov edx, dword [edx + 8]
inc ecx
test edx, edx
jne 0x70454650
cmp ecx, 3
jle 0x70454857
mov esi, dword [esp + 0x2c]
xor ebp, ebp
mov dword [esp + 0x1c], ebp
mov edx, dword [esi]
lea edi, [edx + edx*2 + 6]
mov esi, edi
shr esi, 0x1f
add esi, edi
sar esi, 1
test esi, esi
jle 0x704546a3
mov dword [esp + 4], 4
mov dword [esp], esi
call sub.msvcrt.dll_calloc
test eax, eax
mov dword [esp + 0x1c], eax
je 0x70454898
mov eax, dword [esp + 0x2c]
mov edx, dword [eax]
mov eax, dword [eax + 4]
test edx, edx
mov dword [esp + 0x24], esi
jle 0x704547e5
mov dword [esp + 0x28], 0
mov esi, esi
lea edi, [edi]
mov edi, dword [esp + 0x28]
mov edx, dword [eax + edi*4]
test edx, edx
mov dword [esp + 0x14], edx
je 0x704547d1
lea esi, [esi]
lea edi, [edi]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov ecx, dword [ebp + 4]
mov ebx, dword [eax]
test esi, esi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ebx
je 0x70454867
mov esi, dword [esp + 0x18]
test esi, esi
je 0x70454860
mov edx, dword [esp + 0x18]
movzx ecx, byte [edx]
test cl, cl
je 0x70454860
mov ebp, edx
xor esi, esi
xor edi, edi
lea esi, [esi]
lea edi, [edi]
movsx ecx, cl
mov ebx, ecx
sar ebx, 0x1f
add ecx, esi
adc ebx, edi
mov eax, ecx
mov edx, ebx
inc ebp
shld edx, eax, 0xa
shl eax, 0xa
add eax, ecx
adc edx, ebx
mov ecx, eax
mov ebx, edx
shrd ecx, ebx, 8
mov esi, ecx
movzx ecx, byte [ebp]
shr ebx, 8
xor esi, eax
mov edi, ebx
xor edi, edx
test cl, cl
jne 0x70454730
mov eax, dword [esp + 0x24]
mov dword [esp], esi
mov dword [esp + 4], edi
cdq
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call fcn.704592c0
lea esi, [eax*4]
mov dword [esp], 0xc
call sub.msvcrt.dll_malloc
mov ebp, dword [esp + 0x18]
mov dword [esp], ebp
mov ebx, eax
call fcn.704593d0
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
add esi, edx
mov ecx, dword [esi]
mov dword [ebx], eax
mov eax, dword [esp + 0x20]
mov dword [ebx + 8], ecx
mov dword [esi], ebx
mov ebp, dword [edi + 8]
mov dword [ebx + 4], eax
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x704546e0
mov esi, dword [esp + 0x2c]
mov eax, dword [esi + 4]
inc dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
cmp dword [ebx], edi
jg 0x704546c0
test eax, eax
je 0x70454846
mov ecx, dword [esp + 0x2c]
cmp dword [ecx], 0
jle 0x70454833
xor ebx, ebx
mov edi, ecx
lea esi, [esi]
lea edi, [edi]
mov esi, dword [eax + ebx*4]
test esi, esi
je 0x7045482e
mov esi, esi
lea edi, [edi]
mov ebp, dword [esi + 8]
mov ecx, dword [esi]
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov dword [esp], esi
mov esi, ebp
call sub.msvcrt.dll_free
test ebp, ebp
jne 0x70454810
mov eax, dword [edi + 4]
inc ebx
cmp ebx, dword [edi]
jl 0x70454800
mov dword [esp], eax
call sub.msvcrt.dll_free
mov edx, dword [esp + 0x2c]
mov dword [edx + 4], 0
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov dword [esi], edi
mov dword [esi + 4], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x70454787
mov edi, 4
mov dword [esp + 4], edi
mov dword [esp], 1
call sub.msvcrt.dll_calloc
test eax, eax
setne bl
movzx edx, bl
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], edx
jmp 0x70454701
xor ebp, ebp
jmp 0x704545f7
mov ebp, dword [esp + 0x2c]
xor esi, esi
mov edx, dword [ebp]
mov eax, dword [ebp + 4]
jmp 0x704546a3
mov edi, dword [esp + 0x2c]
mov dword [edi + 4], 0
mov dword [esp + 4], 4
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov edx, dword [esp + 0x2c]
test eax, eax
setne cl
movzx esi, cl
mov dword [edx + 4], eax
mov dword [esp + 0x18], esi
mov dword [edx], esi
jmp 0x70454571