Function at 0x574110
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push esi
mov esi, dword [esp + 0x2c]
mov eax, dword [esi + 0x48]
test eax, eax
jne 0x574123
xor ecx, ecx
jmp 0x574140
cmp eax, 1
je 0x57413b
cmp eax, 2
jne 0x574132
lea ecx, [eax + 0xf]
jmp 0x574140
cmp eax, 3
jne 0x574370
mov ecx, 1
mov eax, dword [esi + 0x44]
push ebp
mov ebp, dword [esp + 0x4c]
add eax, ebp
cmp eax, ecx
lea edx, [ecx + 0xf]
mov dword [esp + 8], edx
jb 0x57417a
sub eax, ecx
mov ecx, dword [esp + 0x40]
shr eax, 4
shl eax, 4
cmp eax, dword [esp + 0x44]
mov dword [ecx], eax
jbe 0x574184
pop ebp
mov dword [ecx], 0
mov eax, 0xa
pop esi
add esp, 0x24
ret
mov eax, dword [esp + 0x40]
mov dword [eax], 0
test ebp, ebp
jne 0x574190
pop ebp
xor eax, eax
pop esi
add esp, 0x24
ret
cmp dword [esi + 0x44], 0
push ebx
mov ebx, dword [esp + 0x4c]
push edi
mov edi, dword [esp + 0x44]
jbe 0x57428a
mov ecx, dword [esi + 0x44]
lea eax, [ecx + ebp]
cmp eax, edx
jbe 0x57428a
cmp ecx, 0x10
jae 0x5741f2
mov eax, 0x10
sub eax, ecx
lea ebp, [eax - 1]
test ebp, ebp
lea ecx, [ecx + esi + 0x20]
mov dword [esp + 0x38], ebx
jl 0x5741e5
lea ecx, [ecx]
mov edx, dword [esp + 0x38]
mov dl, byte [edx]
add dword [esp + 0x38], 1
mov byte [ecx], dl
add ecx, 1
sub ebp, 1
jns 0x5741d0
add ebx, eax
sub dword [esp + 0x54], eax
mov dword [esi + 0x44], 0x10
mov ecx, dword [esp + 0x3c]
lea ebp, [esi + 0x20]
push ebp
lea eax, [esp + 0x18]
push eax
push ecx
call dword [esp + 0x4c]
mov edx, dword [esi + 0x18]
xor dword [esp + 0x28], edx
mov eax, dword [esp + 0x20]
xor eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x24]
xor ecx, dword [esi + 0x14]
mov edx, dword [esp + 0x2c]
xor edx, dword [esi + 0x1c]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov dword [edi + 0xc], edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
mov dword [edi + 8], eax
mov eax, dword [esi + 0x28]
add dword [esi + 0x44], 0xfffffff0
add edi, 8
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x24]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp]
mov dword [esi + 0x14], edx
mov edx, dword [esi + 0x30]
mov dword [esi + 0x10], ecx
mov ecx, dword [esi + 0x2c]
mov dword [ebp], edx
mov edx, dword [esi + 0x3c]
mov ebp, dword [esp + 0x60]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x34]
mov dword [esi + 0x1c], ecx
mov ecx, dword [esi + 0x38]
mov dword [esi + 0x2c], edx
mov edx, dword [esp + 0x1c]
add esp, 0xc
add edi, 8
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], ecx
cmp dword [esi + 0x44], 0
ja 0x5741a4
cmp ebp, edx
jbe 0x574346
mov eax, ebp
sub eax, edx
sub eax, 1
shr eax, 4
add eax, 1
mov dword [esp + 0x38], eax
mov eax, dword [ebx]
mov dword [esp + 0x24], eax
mov ecx, dword [ebx + 4]
mov dword [esp + 0x28], ecx
mov edx, dword [ebx + 8]
add ebx, 8
mov dword [esp + 0x2c], edx
mov eax, dword [ebx + 4]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
push edx
push eax
add ebx, 8
call dword [esp + 0x4c]
mov eax, dword [esp + 0x20]
xor eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x24]
xor ecx, dword [esi + 0x14]
mov edx, dword [esp + 0x28]
xor edx, dword [esi + 0x18]
mov ebp, dword [esp + 0x2c]
xor ebp, dword [esi + 0x1c]
sub dword [esp + 0x60], 0x10
mov dword [edi + 4], ecx
mov dword [edi], eax
add edi, 8
mov dword [edi], edx
mov dword [edi + 4], ebp
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x34]
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x3c]
add esp, 0xc
add edi, 8
sub dword [esp + 0x38], 1
mov dword [esp + 0x20], ebp
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
jne 0x5742a3
mov ebp, dword [esp + 0x54]
mov edx, dword [esi + 0x44]
lea edi, [ebp - 1]
test edi, edi
lea eax, [esi + edx + 0x20]
jl 0x574363
mov cl, byte [ebx]
mov byte [eax], cl
add eax, 1
add ebx, 1
sub edi, 1
jns 0x574354
add dword [esi + 0x44], ebp
pop edi
pop ebx
pop ebp
xor eax, eax
pop esi
add esp, 0x24
ret
mov edx, dword [esp + 0x3c]
mov dword [edx], 0
mov eax, 0xb
pop esi
add esp, 0x24
ret