Function at 0x405b10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x14]
movzx ecx, word [eax*2 + 0x416ca8]
mov edx, dword [ebp + 0x18]
movzx eax, word [edx*2 + 0x416ca8]
push ebx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp + 0x1c]
movzx edx, word [ecx*2 + 0x416ca8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x28], eax
mov eax, dword [0x5f62e0]
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], eax
jle 0x40639c
mov esi, dword [0x5ee2d4]
cmp edi, 1
jae 0x405bdc
mov ebx, dword [0x5ee2cc]
cmp esi, dword [0x5ee2d0]
jae 0x405b84
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405bc4
cmp ebx, 8
jb 0x405c07
mov ebx, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push eax
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
mov ebx, dword [0x5ee2cc]
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, 1
jb 0x405b73
mov dword [0x5ee2d4], esi
dec edi
test byte [ebp - 4], 1
je 0x405e09
shr dword [ebp - 4], 1
dec dword [ebp - 0x18]
cmp edi, dword [ebp + 0x14]
jae 0x405c73
cmp esi, dword [0x5ee2d0]
jae 0x405c0f
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405c5b
test ebx, ebx
jne 0x405b8e
xor al, al
jmp 0x405bc4
cmp dword [0x5ee2cc], 8
jae 0x405c26
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x405c2b
xor al, al
jmp 0x405c5b
mov ebx, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push eax
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp + 0x14]
jb 0x405bf6
mov dword [0x5ee2d4], esi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
not eax
and eax, dword [ebp - 0x20]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
movzx eax, byte [edx + 4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x405d6d
jmp 0x405ca3
mov eax, dword [ebp - 0xc]
cmp eax, 0x63
je 0x4063c2
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x405d39
cmp esi, dword [0x5ee2d0]
jae 0x405cd4
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405d21
cmp dword [0x5ee2cc], 8
jae 0x405ceb
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x405cf0
xor al, al
jmp 0x405d21
mov ebx, 8
mov edx, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push edx
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp - 0xc]
jb 0x405cc3
mov dword [0x5ee2d4], esi
mov ecx, dword [ebp - 0xc]
movzx eax, word [ecx*2 + 0x416ca8]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
not edx
and eax, edx
mov edx, dword [ecx + 8]
lea eax, [eax + eax*2]
lea eax, [edx + eax*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x405ca0
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
mov eax, dword [ebp - 8]
sub edi, ecx
mov cl, byte [edx + 8]
mov byte [eax + 0x5ee2e0], cl
inc eax
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x406392
mov ebx, dword [0x5f6314]
mov edx, dword [0x5f62ec]
mov dword [ebp - 0xc], edx
test ebx, ebx
je 0x405dce
mov esi, ebx
cmp ebx, eax
jb 0x405dac
mov esi, eax
mov eax, dword [0x5f6318]
push esi
push 0x5ee2e0
push eax
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6318], esi
mov dword [0x5f6314], ebx
mov ecx, dword [ebp - 8]
jcxz 0x405df3
mov esi, 0x5ee2e0
mov ebx, dword [ebp - 0xc]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6320]
loop 0x405ddc
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [0x5f62ec], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], eax
jmp 0x40638c
shr dword [ebp - 4], 1
cmp edi, 6
jae 0x405e87
cmp esi, dword [0x5ee2d0]
jae 0x405e22
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405e6f
cmp dword [0x5ee2cc], 8
jae 0x405e39
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x405e3e
xor al, al
jmp 0x405e6f
mov ebx, 8
mov edx, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push edx
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 6
jb 0x405e11
mov dword [0x5ee2d4], esi
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, 0x3f
shr ecx, 6
sub edi, 6
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], ecx
cmp edi, dword [ebp + 0x1c]
jae 0x405f16
cmp esi, dword [0x5ee2d0]
jae 0x405eb1
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405efe
cmp dword [0x5ee2cc], 8
jae 0x405ec8
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x405ecd
xor al, al
jmp 0x405efe
mov ebx, 8
mov ecx, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push ecx
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp + 0x1c]
jb 0x405ea0
mov dword [0x5ee2d4], esi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
not eax
and eax, dword [ebp - 0x24]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
movzx eax, byte [edx + 4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x40600a
jmp 0x405f43
mov eax, dword [ebp - 0xc]
cmp eax, 0x63
je 0x4063c2
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x405fd6
nop
cmp esi, dword [0x5ee2d0]
jae 0x405f71
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x405fbe
cmp dword [0x5ee2cc], 8
jae 0x405f88
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x405f8d
xor al, al
jmp 0x405fbe
mov ebx, 8
mov edx, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push edx
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp - 0xc]
jb 0x405f60
mov dword [0x5ee2d4], esi
mov ecx, dword [ebp - 0xc]
movzx eax, word [ecx*2 + 0x416ca8]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
not edx
and eax, edx
mov edx, dword [ecx + 8]
lea eax, [eax + eax*2]
lea eax, [edx + eax*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x405f40
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
mov eax, dword [ebp - 8]
sub edi, ecx
movzx ecx, word [edx + 8]
sub eax, ecx
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
cmp edi, dword [ebp + 0x18]
jae 0x40609e
mov ebx, dword [0x5ee2cc]
lea ecx, [ecx]
cmp esi, dword [0x5ee2d0]
jae 0x406041
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x406086
cmp ebx, 8
jb 0x4060f1
mov ebx, 8
mov edx, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push edx
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
mov ebx, dword [0x5ee2cc]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp + 0x18]
jb 0x406030
mov dword [0x5ee2d4], esi
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
not eax
and eax, dword [ebp - 0x28]
lea ecx, [eax + eax*2]
movzx eax, byte [edx + ecx*4 + 4]
lea edx, [edx + ecx*4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x406195
cmp eax, 0x63
je 0x4063c2
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x406161
cmp esi, dword [0x5ee2d0]
jae 0x4060fd
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x406149
test ebx, ebx
jne 0x40604f
xor al, al
jmp 0x406086
cmp dword [0x5ee2cc], 8
jae 0x406114
mov ebx, dword [0x5ee2cc]
test ebx, ebx
jne 0x406119
xor al, al
jmp 0x406149
mov ebx, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push eax
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0xc]
jb 0x4060e0
mov dword [0x5ee2d4], esi
mov eax, dword [ebp - 0xc]
movzx eax, word [eax*2 + 0x416ca8]
mov ecx, dword [ebp - 4]
not ecx
and eax, ecx
lea edx, [eax + eax*2]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x4060c0
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
movzx ecx, byte [edx + 5]
movzx edx, word [edx + 8]
sub edi, ecx
mov dword [ebp - 0x10], edx
test eax, eax
je 0x40623f
cmp edi, 8
jae 0x40622d
mov ebx, dword [0x5ee2cc]
lea esp, [esp]
cmp esi, dword [0x5ee2d0]
jae 0x4061d1
mov al, byte [esi + 0x5ee2d8]
inc esi
jmp 0x406215
cmp ebx, 8
jb 0x406291
mov ebx, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], ebx
push ebx
push eax
push 0x5ee2d8
mov esi, 1
mov dword [0x5ee2d0], ebx
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], ebx
mov ebx, dword [0x5ee2cc]
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, 8
jb 0x4061c0
mov dword [0x5ee2d4], esi
mov eax, dword [ebp - 4]
movzx ecx, al
add dword [ebp - 0x10], ecx
shr eax, 8
mov dword [ebp - 4], eax
sub edi, 8
mov ebx, dword [ebp - 0x10]
sub dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
jmp 0x406250
and ecx, 0x7fff
mov dword [ebp - 0x14], ecx
mov edx, ecx
cmp ecx, eax
ja 0x406261
mov edx, eax
mov esi, 0x8000
sub esi, edx
cmp esi, ebx
jbe 0x40626e
mov esi, ebx
sub ebx, esi
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], ebx
je 0x4062a0
cmp eax, ecx
ja 0x4062a0
mov ebx, dword [ebp - 8]
push esi
lea edx, [ebx + 0x5ee2e0]
push 0
push edx
call fcn.00410d00
jmp 0x4062c2
test ebx, ebx
jne 0x4061df
xor al, al
jmp 0x406215
mov edx, eax
sub edx, ecx
cmp edx, esi
jb 0x4062e0
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 8]
push esi
lea ecx, [eax + 0x5ee2e0]
push ecx
lea edx, [ebx + 0x5ee2e0]
push edx
call fcn.0040cb60
add ebx, esi
add esp, 0xc
add dword [ebp - 0x14], esi
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], ebx
mov eax, ebx
jmp 0x4062f9
mov dl, byte [ecx + 0x5ee2e0]
mov byte [eax + 0x5ee2e0], dl
inc eax
inc ecx
sub esi, 1
jne 0x4062e0
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x406381
mov ebx, dword [0x5f6314]
mov eax, dword [0x5f62ec]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x406348
mov esi, ebx
cmp ebx, 0x8000
jb 0x406325
mov esi, 0x8000
mov ecx, dword [0x5f6318]
push esi
push 0x5ee2e0
push ecx
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6318], esi
mov dword [0x5f6314], ebx
mov ecx, dword [ebp - 8]
jcxz 0x40636d
mov esi, 0x5ee2e0
mov ebx, dword [ebp - 0x1c]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6320]
loop 0x406356
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov dword [0x5f62ec], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jne 0x406250
mov esi, dword [0x5ee2d4]
cmp dword [ebp - 0x18], 0
jg 0x405b68
mov eax, dword [ebp - 8]
mov ecx, dword [0x5f62ec]
push eax
push 0x5ee2e0
push ecx
call fcn.00403ef0
add esp, 0xc
pop edi
pop esi
mov dword [0x5f62ec], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret