Function at 0x405d10
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [0x8aeda4]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
push edi
mov edi, dword [esp + 0x34]
test esi, esi
jl 0x405d3a
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0xffffffff
jmp 0x405d4a
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 1
test edi, edi
jl 0x405d60
mov dword [esp + 0x20], 0xffffff78
mov dword [esp + 0x24], 0xffffffff
jmp 0x405d70
mov dword [esp + 0x20], 0x88
mov dword [esp + 0x24], 1
mov ebp, ecx
mov ebx, ecx
sar ecx, 8
sar ebx, 0xb
and ecx, 7
and ebp, 3
and ebx, 1
cmp ecx, 7
ja case.default.0x405d8c
jmp dword [ecx*4 + 0x4061bc]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0xffffff78
jmp case.default.0x405d8c
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], 0x88
jmp case.default.0x405d8c
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0xffffff78
jmp case.default.0x405d8c
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x14], 0x88
jmp case.default.0x405d8c
mov dword [esp + 0x10], 0xffffff78
mov dword [esp + 0x14], 1
jmp case.default.0x405d8c
mov dword [esp + 0x10], 0x88
mov dword [esp + 0x14], 1
jmp case.default.0x405d8c
mov dword [esp + 0x10], 0xffffff78
jmp 0x405e11
mov dword [esp + 0x10], 0x88
mov dword [esp + 0x14], 0xffffffff
cmp ebp, 3
ja case.default.0x405e22
jmp dword [ebp*4 + 0x4061dc]
mov ecx, dword [esp + 0x2c]
test ebx, ebx
je 0x405e9d
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
mov dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x405e69
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x20]
add ebx, ebp
mov ebp, dword [esp + 0x24]
and ebx, 0xfffff
and ecx, 0xfffff
add edi, ebp
mov ebp, dword [eax + ebx*4]
mov dword [eax + ecx*4], ebp
jne 0x405e43
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov edi, dword [ecx]
add edi, ebp
and edi, 0xfffff
test esi, esi
mov dword [ecx], edi
je case.default.0x405e22
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
add edx, ebx
mov ebx, dword [esp + 0x1c]
and edx, 0xfffff
add esi, ebx
jmp 0x405e31
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
mov dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x405ed5
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x18]
add ebx, ebp
mov ebp, dword [esp + 0x1c]
and ebx, 0xfffff
and ecx, 0xfffff
add esi, ebp
mov ebp, dword [eax + ebx*4]
mov dword [eax + ecx*4], ebp
jne 0x405eaf
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov esi, dword [ecx]
add esi, ebp
and esi, 0xfffff
test edi, edi
mov dword [ecx], esi
je case.default.0x405e22
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x24]
and edx, 0xfffff
add edi, ebx
jmp 0x405e9d
mov ecx, dword [esp + 0x2c]
test ebx, ebx
je 0x405f7f
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
or dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x405f4b
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x20]
add ebx, ebp
mov ebp, dword [esp + 0x24]
and ebx, 0xfffff
and ecx, 0xfffff
add edi, ebp
mov ebp, dword [eax + ebx*4]
or dword [eax + ecx*4], ebp
test edi, edi
jne 0x405f23
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov edi, dword [ecx]
add edi, ebp
and edi, 0xfffff
test esi, esi
mov dword [ecx], edi
je case.default.0x405e22
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
add edx, ebx
mov ebx, dword [esp + 0x1c]
and edx, 0xfffff
add esi, ebx
jmp 0x405f11
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
or dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x405fb9
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x18]
add ebx, ebp
mov ebp, dword [esp + 0x1c]
and ebx, 0xfffff
and ecx, 0xfffff
add esi, ebp
mov ebp, dword [eax + ebx*4]
or dword [eax + ecx*4], ebp
test esi, esi
jne 0x405f91
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov esi, dword [ecx]
add esi, ebp
and esi, 0xfffff
test edi, edi
mov dword [ecx], esi
je case.default.0x405e22
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x24]
and edx, 0xfffff
add edi, ebx
jmp 0x405f7f
mov ecx, dword [esp + 0x2c]
test ebx, ebx
je 0x406063
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
and dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x40602f
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x20]
add ebx, ebp
mov ebp, dword [esp + 0x24]
and ebx, 0xfffff
and ecx, 0xfffff
add edi, ebp
mov ebp, dword [eax + ebx*4]
and dword [eax + ecx*4], ebp
test edi, edi
jne 0x406007
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov edi, dword [ecx]
add edi, ebp
and edi, 0xfffff
test esi, esi
mov dword [ecx], edi
je case.default.0x405e22
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
add edx, ebx
mov ebx, dword [esp + 0x1c]
and edx, 0xfffff
add esi, ebx
jmp 0x405ff5
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
and dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x40609d
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x18]
add ebx, ebp
mov ebp, dword [esp + 0x1c]
and ebx, 0xfffff
and ecx, 0xfffff
add esi, ebp
mov ebp, dword [eax + ebx*4]
and dword [eax + ecx*4], ebp
test esi, esi
jne 0x406075
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov esi, dword [ecx]
add esi, ebp
and esi, 0xfffff
test edi, edi
mov dword [ecx], esi
je case.default.0x405e22
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x24]
and edx, 0xfffff
add edi, ebx
jmp 0x406063
mov ecx, dword [esp + 0x2c]
test ebx, ebx
je 0x406147
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
xor dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x406113
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x20]
add ebx, ebp
mov ebp, dword [esp + 0x24]
and ebx, 0xfffff
and ecx, 0xfffff
add edi, ebp
mov ebp, dword [eax + ebx*4]
xor dword [eax + ecx*4], ebp
test edi, edi
jne 0x4060eb
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov edi, dword [ecx]
add edi, ebp
and edi, 0xfffff
test esi, esi
mov dword [ecx], edi
je case.default.0x405e22
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
add edx, ebx
mov ebx, dword [esp + 0x1c]
and edx, 0xfffff
add esi, ebx
jmp 0x4060d9
mov ecx, dword [ecx]
mov ebp, dword [eax + edx*4]
mov ebx, edx
xor dword [eax + ecx*4], ebp
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x406181
mov ebp, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x18]
add ebx, ebp
mov ebp, dword [esp + 0x1c]
and ebx, 0xfffff
and ecx, 0xfffff
add esi, ebp
mov ebp, dword [eax + ebx*4]
xor dword [eax + ecx*4], ebp
test esi, esi
jne 0x406159
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x14]
mov esi, dword [ecx]
add esi, ebp
and esi, 0xfffff
test edi, edi
mov dword [ecx], esi
je case.default.0x405e22
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x24]
and edx, 0xfffff
add edi, ebx
jmp 0x406147
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc