Function at 0x46d748
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x584
xor eax, eax
mov ecx, 0x11
push ebx
mov dword [esp + 0x34], 0
push esi
push edi
lea edi, [esp + 0x48]
push ebp
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x598]
mov eax, dword [esp + 0x59c]
mov ecx, edi
mov edx, dword [ecx]
add ecx, 4
inc dword [esp + edx*4 + 0x4c]
dec eax
jne 0x46d777
mov eax, dword [esp + 0x59c]
cmp dword [esp + 0x4c], eax
mov eax, dword [esp + 0x5b4]
jne 0x46d7aa
pop ebp
mov dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x584
ret
mov edx, dword [eax]
mov ecx, 1
lea eax, [esp + 0x50]
cmp dword [eax], 0
jne 0x46d7c9
add eax, 4
inc ecx
lea esi, [esp + 0x8c]
cmp eax, esi
jbe 0x46d7b5
mov dword [esp + 0x18], ecx
mov esi, ecx
cmp ecx, edx
jbe 0x46d7d5
mov edx, esi
mov ebx, 0x10
lea eax, [esp + 0x8c]
cmp dword [eax], 0
jne 0x46d7f2
sub eax, 4
dec ebx
lea ebp, [esp + 0x4c]
cmp eax, ebp
jne 0x46d7e1
mov dword [esp + 0x28], ebx
cmp ebx, edx
jae 0x46d7fc
mov edx, ebx
mov eax, dword [esp + 0x5b4]
mov dword [eax], edx
mov eax, 1
shl eax, cl
mov dword [esp + 0x1c], eax
cmp ecx, ebx
jae 0x46d832
lea eax, [esp + ecx*4 + 0x4c]
mov ebp, dword [eax]
sub dword [esp + 0x1c], ebp
js 0x46d84e
add eax, 4
inc ecx
mov ebp, dword [esp + 0x1c]
add ebp, ebp
cmp ecx, ebx
mov dword [esp + 0x1c], ebp
jb 0x46d818
lea ecx, [esp + ebx*4 + 0x4c]
mov eax, dword [ecx]
sub dword [esp + 0x1c], eax
jns 0x46d85e
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x584
ret
mov eax, 2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x584
ret
add eax, dword [esp + 0x1c]
lea ebp, [esp + 0x98]
mov dword [ecx], eax
xor eax, eax
lea ecx, [esp + 0x50]
dec ebx
mov dword [esp + 0x94], eax
je 0x46d889
add eax, dword [ecx]
add ecx, 4
mov dword [ebp], eax
add ebp, 4
dec ebx
jne 0x46d87b
xor ebx, ebx
mov eax, dword [edi]
add edi, 4
test eax, eax
je 0x46d8a7
lea ecx, [esp + eax*4 + 0x90]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [esp + eax*4 + 0x110], ebx
inc ebx
cmp ebx, dword [esp + 0x59c]
jb 0x46d88b
xor eax, eax
lea edi, [esp + 0x114]
mov ebx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0xd4], eax
mov dword [esp + 0x34], eax
neg ebx
mov dword [esp + 0x38], eax
cmp esi, dword [esp + 0x28]
mov dword [esp + 0x3c], 0xffffffff
jg 0x46db44
mov eax, dword [esp + 0x18]
lea ecx, [esp + eax*4 + 0x4c]
mov dword [esp + 0x44], ecx
mov eax, dword [ecx]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x46db32
lea eax, [edx + ebx]
cmp eax, dword [esp + 0x18]
jge 0x46da12
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
shl esi, 2
and eax, 0xffff
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x48], eax
add esi, 4
add ebx, edx
mov edi, dword [esp + 0x14]
inc dword [esp + 0x3c]
sub edi, ebx
cmp edi, edx
jbe 0x46d950
movzx edi, dx
mov ecx, dword [esp + 0x18]
mov ebp, 1
sub ecx, ebx
shl ebp, cl
cmp ebp, dword [esp + 0x48]
jbe 0x46d983
mov eax, dword [esp + 0x2c]
inc ecx
inc eax
sub ebp, eax
mov eax, dword [esp + 0x44]
cmp ecx, edi
jae 0x46d983
add ebp, ebp
add eax, 4
cmp ebp, dword [eax]
jbe 0x46d983
sub ebp, dword [eax]
inc ecx
cmp ecx, edi
jb 0x46d973
mov eax, 1
mov ebp, dword [esp + 0x5ac]
shl eax, cl
mov edi, dword [esp + 0x40]
mov dword [esp + 0x38], eax
lea eax, [ebp + edi*8]
mov ebp, dword [esp + 0x38]
mov dword [esp + 0x34], eax
add dword [esp + 0x40], ebp
mov edi, dword [esp + 0x40]
cmp edi, dword [esp + 0x5b0]
ja 0x46db62
mov dword [esp + esi + 0xd4], eax
test esi, esi
je 0x46da05
mov eax, dword [esp + 0x10]
add cl, 0x10
mov dword [esp + esi + 0x90], eax
mov byte [esp + 0x21], dl
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x10]
mov byte [esp + 0x20], cl
mov dword [esp + 0x24], eax
mov ecx, ebx
sub cl, dl
shr ebp, cl
shl ebp, 3
add ebp, dword [esp + esi + 0xd0]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov dword [ebp], eax
mov dword [ebp + 4], edi
lea eax, [edx + ebx]
cmp eax, dword [esp + 0x18]
jl 0x46d93a
mov cl, byte [esp + 0x18]
mov eax, dword [esp + 0x59c]
sub cl, bl
lea ebp, [esp + eax*4 + 0x114]
mov byte [esp + 0x21], cl
cmp ebp, dword [esp + 0x30]
ja 0x46da37
mov byte [esp + 0x20], 0x63
jmp 0x46da8d
mov edi, dword [esp + 0x30]
mov esi, dword [edi]
cmp esi, dword [esp + 0x5a0]
jae 0x46da60
mov byte [esp + 0x14], 0x10
cmp esi, 0x100
adc byte [esp + 0x14], 0xff
mov al, byte [esp + 0x14]
mov byte [esp + 0x20], al
jmp 0x46da83
sub esi, dword [esp + 0x5a0]
mov eax, dword [esp + 0x5a8]
add esi, esi
mov ebp, dword [esp + 0x5a4]
mov al, byte [esi + eax]
mov si, word [ebp + esi]
mov byte [esp + 0x20], al
add dword [esp + 0x30], 4
mov word [esp + 0x24], si
mov edi, 1
mov esi, dword [esp + 0x10]
shl edi, cl
mov cl, bl
shr esi, cl
cmp esi, dword [esp + 0x38]
jae 0x46dacd
mov eax, dword [esp + 0x34]
lea ebp, [edi*8]
mov dword [esp + 0x14], ebp
lea ecx, [eax + esi*8]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
add esi, edi
mov dword [ecx], eax
mov dword [ecx + 4], ebp
add ecx, dword [esp + 0x14]
cmp esi, dword [esp + 0x38]
jb 0x46dab4
mov eax, 1
mov cl, byte [esp + 0x18]
dec cl
shl eax, cl
test dword [esp + 0x10], eax
je 0x46daed
xor dword [esp + 0x10], eax
shr eax, 1
test dword [esp + 0x10], eax
jne 0x46dae0
mov cl, bl
xor dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
lea esi, [esp + eax*4 + 0x90]
mov eax, 1
shl eax, cl
dec eax
and eax, dword [esp + 0x10]
cmp eax, dword [esi]
je 0x46d900
sub esi, 4
sub ebx, edx
mov eax, 1
mov cl, bl
shl eax, cl
dec eax
dec dword [esp + 0x3c]
and eax, dword [esp + 0x10]
cmp eax, dword [esi]
jne 0x46db12
jmp 0x46d900
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x28]
jle 0x46d8ee
cmp dword [esp + 0x1c], 0
je 0x46db72
cmp dword [esp + 0x28], 1
je 0x46db72
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x584
ret
mov eax, 3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x584
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x584
ret