Function at 0x405d90
Capabilities:
Encode data using xor

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x24
mov ebx, edx
mov ebp, eax
mov esi, dword [ebp + 0x1c]
cmp esi, 0xff
jle 0x405dab
mov esi, 0xff
cmp dword [ebp], 0
je 0x405dfb
test esi, esi
je 0x405dfb
cmp dword [ebp + 0x14c], 0
jne 0x406078
mov dword [esp + 0x20], 0
test esi, esi
jle 0x4060fd
mov edx, dword [esp + 0x20]
mov edi, dword [ebp + 0x10]
movzx eax, byte [edi + edx*4]
cmp eax, 0xff
jl 0x4060ea
inc edx
cmp edx, esi
jl 0x405dd9
mov dword [esp + 0x20], edx
xor edx, edx
mov dword [esp + 0x1c], edx
test ecx, ecx
jne 0x405e05
xor eax, eax
add esp, 0x24
pop ebx
pop ebp
pop esi
pop edi
ret
lea ecx, [ebp + 0x28]
mov dword [esp], ecx
mov dword [ecx], 0x5367674f
mov esi, dword [ebp + 0x10]
mov dword [esp + 8], esi
xor ecx, ecx
mov byte [ebp + 0x2c], cl
mov byte [ebp + 0x2d], cl
test dword [esi], 0x100
jne 0x405e36
mov byte [ebp + 0x2d], 1
mov dword [esp + 0xc], 1
jmp 0x405e3c
xor ecx, ecx
mov dword [esp + 0xc], ecx
cmp dword [ebp + 0x14c], 0
jne 0x405e53
mov ecx, dword [esp + 0xc]
or ecx, 2
mov dword [esp + 0xc], ecx
mov byte [ebp + 0x2d], cl
cmp dword [ebp + 0x148], 0
je 0x405e6f
mov ecx, dword [esp + 0x20]
cmp ecx, dword [ebp + 0x1c]
jne 0x405e6f
mov ecx, dword [esp + 0xc]
or ecx, 4
mov byte [ebp + 0x2d], cl
mov ecx, dword [esp + 0x1c]
mov dword [ebp + 0x14c], 1
mov byte [ebp + 0x2e], cl
mov ecx, edx
shl ecx, 0x18
mov dword [esp + 0xc], ecx
mov eax, ecx
mov ecx, edx
shr ecx, 8
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x1c]
shr ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], eax
mov byte [ebp + 0x2f], al
shl ecx, 0x18
mov dword [esp + 0x10], ecx
mov eax, ecx
mov ecx, edx
shr ecx, 0x10
shr edx, 0x18
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xc]
shr ecx, 8
or eax, ecx
mov ecx, dword [esp + 0x14]
mov byte [ebp + 0x30], al
shl ecx, 0x18
shr eax, 8
or ecx, eax
mov byte [ebp + 0x31], cl
shl edx, 0x18
shr ecx, 8
or edx, ecx
mov byte [ebp + 0x32], dl
mov ecx, edx
shr ecx, 8
mov byte [ebp + 0x33], cl
mov ecx, edx
shr ecx, 0x10
mov byte [ebp + 0x34], cl
shr edx, 0x18
mov byte [ebp + 0x35], dl
mov edx, dword [ebp + 0x150]
mov byte [ebp + 0x36], dl
mov ecx, edx
shr ecx, 8
mov byte [ebp + 0x37], cl
mov ecx, edx
shr ecx, 0x10
mov byte [ebp + 0x38], cl
mov ecx, dword [ebp + 0x154]
shr edx, 0x18
mov byte [ebp + 0x39], dl
xor eax, eax
cmp ecx, 0xffffffff
mov byte [ebp + 0x3e], al
mov byte [ebp + 0x3f], al
mov byte [ebp + 0x40], al
mov byte [ebp + 0x41], al
jne 0x405f36
mov ecx, 0
lea esi, [ecx + 1]
mov dword [ebp + 0x154], esi
mov byte [ebp + 0x3a], cl
mov edx, ecx
shr edx, 8
mov byte [ebp + 0x3b], dl
mov edx, ecx
shr edx, 0x10
mov byte [ebp + 0x3c], dl
mov edx, dword [esp + 0x20]
shr ecx, 0x18
mov byte [ebp + 0x3d], cl
mov byte [ebp + 0x42], dl
xor esi, esi
test edx, edx
jle 0x405f83
mov ecx, dword [esp + 8]
xor eax, eax
movzx ecx, byte [ecx + eax*4]
mov byte [eax + ebp + 0x43], cl
add esi, ecx
inc eax
cmp eax, edx
jge 0x405f7f
mov ecx, dword [ebp + 0x10]
jmp 0x405f6b
mov dword [esp + 0x20], edx
mov ecx, dword [esp]
mov dword [ebx], ecx
lea edi, [edx + 0x1b]
mov dword [ebp + 0x144], edi
mov dword [ebx + 4], edi
mov ecx, dword [ebp]
add ecx, dword [ebp + 0xc]
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], esi
mov ecx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x10]
sub ecx, edx
mov dword [ebp + 0x1c], ecx
lea edx, [edi + edx*4]
shl ecx, 2
push ecx
push edx
push edi
mov dword [esp + 0x24], ebp
call fcn.0042a9c0
mov edx, dword [esp + 0x2c]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
lea edi, [eax + edx*8]
shl ecx, 3
push ecx
push edi
push eax
call fcn.0042a9c0
add esp, 0x18
add dword [ebp + 0xc], esi
mov edx, dword [ebx]
xor eax, eax
mov byte [edx + 0x16], al
mov ecx, dword [ebx]
mov byte [ecx + 0x17], al
mov ebp, dword [ebx]
mov byte [ebp + 0x18], al
mov esi, dword [ebx]
mov byte [esi + 0x19], al
mov ebp, dword [ebx + 4]
mov edx, dword [ebx]
test ebp, ebp
jle 0x40601a
xor ecx, ecx
movzx edi, byte [ecx + edx]
mov esi, eax
shl esi, 8
shr eax, 0x18
xor eax, edi
mov edi, eax
mov eax, esi
xor eax, dword [edi*4 + 0x4346e0]
inc ecx
cmp ecx, ebp
jl 0x405ffc
mov ebp, dword [ebx + 0xc]
test ebp, ebp
jle 0x40604c
mov esi, dword [ebx + 8]
mov dword [esp + 4], ebx
xor ecx, ecx
movzx edi, byte [ecx + esi]
mov ebx, eax
shl ebx, 8
shr eax, 0x18
xor eax, edi
mov edi, eax
mov eax, ebx
xor eax, dword [edi*4 + 0x4346e0]
inc ecx
cmp ecx, ebp
jl 0x40602a
mov ebx, dword [esp + 4]
mov byte [edx + 0x16], al
mov ecx, dword [ebx]
mov edx, eax
shr edx, 8
mov byte [ecx + 0x17], dl
mov ebp, dword [ebx]
mov edx, eax
shr edx, 0x10
mov byte [ebp + 0x18], dl
mov ebx, dword [ebx]
shr eax, 0x18
mov byte [ebx + 0x19], al
mov eax, 1
add esp, 0x24
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x20], 0
mov edx, 0xffffffff
test esi, esi
mov dword [esp + 0x1c], edx
jle 0x405df7
mov edi, dword [ebp + 0x10]
mov dword [esp], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp + 0x18], ebp
mov ebp, edi
mov dword [esp + 4], ebx
xor eax, eax
mov esi, eax
mov ebx, eax
movzx eax, byte [ebp + ecx*4]
add esi, eax
cmp eax, 0xff
jge 0x4060d4
mov edx, dword [esp + 0x18]
mov edi, dword [edx + 0x14]
mov eax, dword [edi + ecx*8]
mov edx, dword [edi + ecx*8 + 4]
inc ebx
mov dword [esp + 0x1c], eax
mov eax, ebx
jmp 0x4060d6
xor eax, eax
inc ecx
cmp ecx, dword [esp + 8]
jge 0x40612c
cmp esi, dword [esp + 0x44]
jle 0x4060af
cmp eax, 4
jl 0x4060af
jmp 0x406108
mov dword [esp + 0x20], edx
inc dword [esp + 0x20]
xor edx, edx
mov dword [esp + 0x1c], edx
jmp 0x405df7
xor edx, edx
mov dword [esp + 0x1c], edx
jmp 0x405df7
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 4]
mov dword [esp + 0x20], ecx
mov ecx, 1
cmp dword [esp + 0x20], 0xff
je 0x405e05
jmp 0x405df7
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp]
jmp 0x406119