Function at 0x405218
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x11c
mov edx, dword [ebp + 0x20]
mov dword [ebp - 0xf8], 0
mov dword [ebp - 0xf4], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea esi, [esi]
mov eax, dword [edi]
inc dword [ebp + eax*4 - 0x58]
add edi, 4
dec esi
jne 0x4052b4
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x58], eax
je 0x4057af
mov eax, dword [edx]
mov dword [ebp - 0xec], eax
mov ebx, 1
lea esi, [esi]
mov eax, dword [ebp + ebx*4 - 0x58]
test eax, eax
jne 0x4052ea
inc ebx
cmp ebx, 0xf
jbe 0x4052dc
cmp dword [ebp - 0xec], ebx
mov dword [ebp - 0xe8], ebx
jae 0x4052fe
mov dword [ebp - 0xec], ebx
mov esi, 0xf
nop
mov eax, dword [ebp + esi*4 - 0x58]
test eax, eax
jne 0x40530f
dec esi
jne 0x405304
cmp dword [ebp - 0xec], esi
mov dword [ebp - 0xe0], esi
jbe 0x405323
mov dword [ebp - 0xec], esi
mov dword [ebp - 0x100], 1
mov cl, bl
mov edi, dword [ebp - 0xec]
shl dword [ebp - 0x100], cl
cmp ebx, dword [ebp - 0xe0]
mov dword [edx], edi
jae 0x405363
lea esi, [esi]
mov eax, dword [ebp + ebx*4 - 0x58]
sub dword [ebp - 0x100], eax
js 0x4057a8
inc ebx
shl dword [ebp - 0x100], 1
cmp ebx, esi
jb 0x405348
mov eax, dword [ebp + esi*4 - 0x58]
sub dword [ebp - 0x100], eax
js 0x4057a8
add eax, dword [ebp - 0x100]
mov dword [ebp + esi*4 - 0x58], eax
xor ebx, ebx
dec esi
mov dword [ebp - 0xd4], 0
lea edi, [ebp - 0x54]
lea ecx, [ebp - 0xd0]
je 0x4053a5
lea esi, [esi]
add ebx, dword [edi]
mov dword [ecx], ebx
add edi, 4
add ecx, 4
dec esi
jne 0x405398
mov edi, dword [ebp + 8]
xor esi, esi
mov esi, esi
mov ebx, dword [edi]
add edi, 4
test ebx, ebx
je 0x4053ca
mov eax, dword [ebp + ebx*4 - 0xd8]
mov ecx, dword [ebp + 0x2c]
mov dword [ecx + eax*4], esi
inc eax
mov dword [ebp + ebx*4 - 0xd8], eax
inc esi
cmp esi, dword [ebp + 0xc]
jb 0x4053ac
mov esi, dword [ebp - 0xe0]
mov eax, dword [ebp - 0xec]
mov ebx, dword [ebp - 0xe0]
mov edx, dword [ebp + esi*4 - 0xd8]
neg eax
xor esi, esi
cmp dword [ebp - 0xe8], ebx
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xd8], 0
mov edi, dword [ebp + 0x2c]
mov dword [ebp - 0xe4], 0xffffffff
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x98], 0
mov dword [ebp - 0xf0], 0
mov dword [ebp - 0x104], 0
jg 0x405725
mov ebx, dword [ebp - 0xe8]
mov eax, dword [ebp + ebx*4 - 0x58]
dec eax
mov dword [ebp - 0xdc], eax
inc eax
je 0x40570d
mov eax, dword [ebp - 0xfc]
add eax, dword [ebp - 0xec]
cmp dword [ebp - 0xe8], eax
mov dword [ebp - 0x108], eax
jle 0x4055fe
mov edx, dword [ebp - 0xdc]
inc edx
mov dword [ebp - 0x10c], edx
mov esi, esi
mov eax, dword [ebp - 0x108]
mov ebx, dword [ebp - 0xe0]
sub ebx, eax
mov ecx, dword [ebp - 0xec]
inc dword [ebp - 0xe4]
cmp ebx, ecx
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x104], ebx
jbe 0x4054ac
mov dword [ebp - 0x104], ecx
mov ebx, dword [ebp - 0xe8]
sub ebx, dword [ebp - 0xfc]
mov dword [ebp - 0x11c], 1
mov cl, bl
shl dword [ebp - 0x11c], cl
mov eax, dword [ebp - 0x10c]
cmp dword [ebp - 0x11c], eax
jbe 0x40552c
mov eax, dword [ebp - 0x11c]
sub eax, dword [ebp - 0xdc]
dec eax
mov dword [ebp - 0x11c], eax
cmp ebx, dword [ebp - 0x104]
mov eax, dword [ebp - 0xe8]
lea ecx, [ebp + eax*4 - 0x58]
jae 0x40552c
inc ebx
cmp ebx, dword [ebp - 0x104]
jae 0x40552c
mov esi, esi
add ecx, 4
shl dword [ebp - 0x11c], 1
mov edx, dword [ecx]
cmp dword [ebp - 0x11c], edx
jbe 0x40552c
inc ebx
sub dword [ebp - 0x11c], edx
cmp ebx, dword [ebp - 0x104]
jb 0x405508
mov esi, esi
mov dword [ebp - 0x104], 1
mov cl, bl
shl dword [ebp - 0x104], cl
mov ecx, dword [ebp + 0x28]
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x104]
lea edx, [ecx + eax]
cmp edx, 0x5a0
ja 0x4057a8
mov ecx, dword [ebp + 0x24]
lea eax, [ecx + eax*8]
mov ecx, dword [ebp - 0xe4]
mov dword [ebp - 0xf0], eax
mov dword [ebp + ecx*4 - 0x98], eax
test ecx, ecx
mov eax, dword [ebp + 0x28]
mov dword [eax], edx
je 0x405798
mov eax, dword [ebp - 0xf8]
mov dword [ebp + ecx*4 - 0xd8], esi
mov ah, byte [ebp - 0xec]
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0xf8], eax
sub ecx, dword [ebp - 0xec]
mov byte [ebp - 0xf8], bl
mov eax, dword [ebp - 0xe4]
mov ebx, esi
shr ebx, cl
mov ecx, dword [ebp + eax*4 - 0x9c]
mov eax, dword [ebp - 0xf0]
sub eax, ecx
sar eax, 3
sub eax, ebx
mov dword [ebp - 0xf4], eax
mov edx, dword [ebp - 0xf4]
mov eax, dword [ebp - 0xf8]
mov dword [ecx + ebx*8], eax
mov dword [ecx + ebx*8 + 4], edx
mov eax, dword [ebp - 0xec]
add dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x108]
cmp dword [ebp - 0xe8], ecx
jg 0x40547c
mov bl, byte [ebp - 0xe8]
sub bl, byte [ebp - 0xfc]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x2c]
mov edx, dword [ebp - 0xf8]
mov dh, bl
lea ebx, [eax + ecx*4]
cmp edi, ebx
mov dword [ebp - 0xf8], edx
jb 0x40574f
mov byte [ebp - 0xf8], 0xc0
mov ecx, dword [ebp - 0xe8]
sub ecx, dword [ebp - 0xfc]
mov dword [ebp - 0x11c], 1
shl dword [ebp - 0x11c], cl
mov ebx, esi
mov cl, byte [ebp - 0xfc]
shr ebx, cl
cmp ebx, dword [ebp - 0x104]
jae 0x405687
mov esi, esi
mov eax, dword [ebp - 0xf8]
mov edx, dword [ebp - 0xf4]
mov ecx, dword [ebp - 0xf0]
mov dword [ecx + ebx*8], eax
mov dword [ecx + ebx*8 + 4], edx
add ebx, dword [ebp - 0x11c]
cmp ebx, dword [ebp - 0x104]
jb 0x405660
mov ecx, dword [ebp - 0xe8]
dec ecx
mov ebx, 1
shl ebx, cl
test ebx, esi
je 0x4056a4
lea esi, [esi]
xor esi, ebx
shr ebx, 1
test ebx, esi
jne 0x40569c
mov cl, byte [ebp - 0xfc]
mov eax, 1
shl eax, cl
xor esi, ebx
dec eax
and eax, esi
mov ecx, dword [ebp - 0xe4]
cmp eax, dword [ebp + ecx*4 - 0xd8]
je 0x4056fa
mov edx, 1
mov esi, esi
mov eax, dword [ebp - 0xec]
sub dword [ebp - 0xfc], eax
mov cl, byte [ebp - 0xfc]
mov eax, edx
shl eax, cl
dec dword [ebp - 0xe4]
dec eax
and eax, esi
mov ebx, dword [ebp - 0xe4]
cmp eax, dword [ebp + ebx*4 - 0xd8]
jne 0x4056cc
dec dword [ebp - 0xdc]
cmp dword [ebp - 0xdc], 0xffffffff
jne 0x40544f
inc dword [ebp - 0xe8]
mov eax, dword [ebp - 0xe0]
cmp dword [ebp - 0xe8], eax
jle 0x405437
mov edi, dword [ebp - 0x100]
test edi, edi
je 0x40574b
cmp dword [ebp - 0xe0], 1
mov eax, 0xfffffffb
je 0x40574b
lea esi, [esi]
add esp, 0x11c
pop ebx
pop esi
pop edi
leave
ret
xor eax, eax
jmp 0x405740
mov eax, dword [edi]
cmp eax, dword [ebp + 0x10]
jae 0x405775
cmp eax, 0xff
mov dl, 0x60
ja 0x405761
xor edx, edx
mov byte [ebp - 0xf8], dl
mov dword [ebp - 0xf4], eax
add edi, 4
jmp 0x405630
mov ebx, eax
sub ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
mov dl, byte [eax + ebx*4]
mov eax, dword [ebp + 0x14]
add edx, 0x50
mov ecx, dword [eax + ebx*4]
mov byte [ebp - 0xf8], dl
mov dword [ebp - 0xf4], ecx
jmp 0x40576d
mov edx, dword [ebp - 0xf0]
mov ebx, dword [ebp + 0x1c]
mov dword [ebx], edx
jmp 0x4055e0
mov eax, 0xfffffffd
jmp 0x405740
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0
mov dword [edx], 0
jmp 0x40574b