Function at 0x8005461
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x30]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [eax], edi
cmp dword [ebx + 0x1c], 3
mov dword [ebp - 4], edi
jne 0x80056cc
mov eax, dword [ebx + 0xc]
cmp eax, edi
je 0x80054a0
push dword [eax + 0x8c]
push dword [ebx + 0x8c]
call fcn.08074b0e
pop ecx
pop ecx
jmp 0x80054b6
mov esi, dword [ebp + 0x10]
add esi, 4
push 9
lea edi, [ebx + 0x90]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 8]
xor edi, edi
cmp dword [esi + 0x90], 0xffffffff
jne 0x800562e
cmp dword [esi + 0x48], edi
jne 0x800562e
cmp dword [esi + 0x28], edi
jne 0x800562e
movzx eax, word [ebx + 0x20]
push edi
push eax
push edi
push edi
push dword [esi]
call dword [esi + 4]
add esp, 0x14
cmp eax, edi
jne 0x8005505
mov ecx, dword [ebx + 0x8c]
mov word [ecx + 0x28], di
mov word [ebx + 0x22], di
mov word [ebx + 0x24], di
mov word [ebx + 0x26], di
mov word [ebx + 0x28], di
jmp 0x8005563
movzx cx, byte [eax + 1]
mov ch, byte [eax]
mov edx, dword [ebx + 0x8c]
mov word [edx + 0x28], cx
xor ecx, ecx
mov ch, byte [eax + 2]
mov cl, byte [eax + 3]
mov word [ebx + 0x22], cx
xor ecx, ecx
mov ch, byte [eax + 4]
mov cl, byte [eax + 5]
mov word [ebx + 0x24], cx
xor ecx, ecx
mov ch, byte [eax + 6]
mov cl, byte [eax + 7]
mov word [ebx + 0x26], cx
movzx dx, byte [eax + 9]
xor ecx, ecx
mov ch, byte [eax + 8]
or cx, dx
mov dx, word [ebx + 0x22]
cmp dx, word [ebx + 0x26]
mov word [ebx + 0x28], cx
jg 0x800561b
cmp word [ebx + 0x24], cx
jg 0x800561b
mov ecx, dword [ebx + 0x8c]
movzx edx, word [ecx + 0x28]
cmp dx, 0xffff
jge 0x800557d
mov edi, 0x1407
jmp 0x8005620
jne 0x800558c
mov dword [ebp - 8], 1
mov word [ecx + 0x28], di
jmp 0x800559a
cmp dx, di
mov dword [ebp - 8], edi
jne 0x80055a1
mov word [ecx + 0x28], 1
mov ecx, dword [ebp + 0x30]
mov dword [ecx], edi
jmp 0x80055aa
mov ecx, dword [ebp + 0x30]
mov dword [ecx], 1
cmp eax, edi
mov dword [ebx + 0x10], eax
je 0x80055cb
add eax, 0xa
mov dword [ebx + 0x14], eax
movzx eax, word [ebx + 0x20]
push 0xffffffffffffffff
push eax
push edi
push edi
push dword [esi]
call dword [esi + 4]
add esp, 0x14
mov dword [ebx + 0x18], eax
cmp dword [esi + 0x90], 0xffffffff
jne 0x800568d
cmp dword [esi + 0x50], edi
jne 0x800568d
mov eax, dword [ebp + 0x10]
mov ax, word [eax]
mov word [ebx + 0x2a], ax
mov word [ebx + 0x2e], di
cmp dword [esi + 0xb8], edi
jne 0x800566d
lea eax, [esi + 0xdc]
mov cx, word [eax]
sub cx, word [esi + 0xde]
mov word [ebx + 0x2c], cx
mov ax, word [eax]
sub ax, word [ebx + 0x28]
mov word [ebx + 0x30], ax
jmp 0x80056b6
mov edi, 0x1400
push eax
push esi
call dword [esi + 8]
pop ecx
pop ecx
mov eax, edi
jmp 0x8005ad7
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 4]
push eax
lea eax, [ebx + 0x22]
push eax
mov eax, dword [ebx + 0x8c]
add eax, 0x28
push eax
push dword [ebp + 0x30]
lea eax, [ebp - 8]
push eax
lea eax, [ebx + 0x10]
push eax
movzx eax, word [ebx + 0x20]
push eax
push esi
call fcn.08010b2d
add esp, 0x20
cmp eax, edi
mov dword [ebp - 4], eax
je 0x80055cb
jmp 0x8005ad7
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 4]
push eax
lea eax, [ebx + 0x30]
push eax
lea eax, [ebx + 0x2c]
push eax
movzx eax, word [ebx + 0x20]
push eax
push esi
call fcn.0801140f
add esp, 0x14
jmp 0x80056b3
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 4]
push eax
lea eax, [ebx + 0x30]
push eax
lea eax, [ebx + 0x2e]
push eax
lea eax, [ebx + 0x2c]
push eax
lea eax, [ebx + 0x2a]
push eax
movzx eax, word [ebx + 0x20]
push eax
push esi
call fcn.08011554
add esp, 0x1c
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, edi
jne 0x8005ad7
xor eax, eax
cmp dword [ebp - 8], edi
setne al
mov dword [ebx + 0x1c], eax
mov eax, dword [ebx + 0x1c]
cmp eax, edi
jne 0x8005891
push dword [ebp + 0x38]
mov eax, dword [ebx + 0x8c]
push dword [ebp + 0x34]
lea ecx, [ebx + 0x88]
push ecx
lea edx, [ebx + 0x86]
push edx
push dword [eax + 0x20]
mov dword [ebp - 4], ecx
push dword [eax + 0x1c]
movzx ecx, word [eax + 0x28]
push ecx
mov ecx, dword [ebp + 0x30]
push dword [ecx]
lea esi, [ebx + 0x10]
push dword [ebp + 0xc]
mov dword [ebp - 0x10], edx
push esi
push dword [eax + 0x10]
mov dword [ebp - 0x20], esi
push dword [eax + 0x14]
push dword [eax + 0x18]
call fcn.08010d37
add esp, 0x34
cmp eax, edi
jne 0x8005ad7
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x3c], edi
je 0x8005740
push dword [ebx + 0x8c]
call fcn.0806a1fd
pop ecx
jmp 0x800576a
mov ecx, dword [ebx + 0x8c]
xor eax, eax
cmp word [ecx + 0x28], di
jle 0x800576a
mov ecx, dword [ebx + 0x8c]
mov ecx, dword [ecx + 0x2c]
mov byte [eax + ecx], 0
mov ecx, dword [ebx + 0x8c]
movsx ecx, word [ecx + 0x28]
inc eax
cmp eax, ecx
jl 0x800574e
push dword [ebp + 0x3c]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 0x1c]
push eax
mov eax, dword [ebp - 4]
push dword [eax]
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
push eax
lea eax, [ebx + 0x22]
push eax
movzx eax, word [ebx + 0x30]
sub esp, 0x24
push 9
pop ecx
mov edi, esp
push dword [ebx + 0xb4]
lea esi, [ebx + 0x90]
push eax
movzx eax, word [ebx + 0x2e]
push eax
movzx eax, word [ebx + 0x2c]
push eax
movzx eax, word [ebx + 0x2a]
push eax
mov eax, dword [ebp + 0x10]
movzx eax, word [eax]
push eax
push dword [ebp + 0x28]
rep movsd dword es:[edi], dword [esi]
push dword [ebp + 0x2c]
push dword [ebx + 0x8c]
push dword [ebp + 0x24]
push dword [ebp + 0x18]
call fcn.08004d02
add esp, 0x6c
test eax, eax
jne 0x8005ad7
mov esi, dword [ebp + 0x10]
push dword [esi + 0x38]
push dword [ebp - 0xc]
call fcn.08004e50
test eax, eax
pop ecx
pop ecx
jne 0x80057fb
mov word [ebx + 0x84], 2
jmp 0x8005806
mov ax, word [ebp + 0x1c]
mov word [ebx + 0x84], ax
push dword [ebx + 0x54]
push dword [ebx + 0x44]
call fcn.0800277c
push dword [ebx + 0x50]
mov edi, eax
push dword [ebx + 0x48]
call fcn.0800277c
add esp, 0x10
sub edi, eax
jns 0x8005855
mov edx, dword [ebx + 0x8c]
xor eax, eax
xor ecx, ecx
cmp word [edx + 0x28], ax
jle 0x8005855
mov edx, dword [ebx + 0x8c]
mov edx, dword [edx + 0x2c]
add eax, edx
xor byte [eax], 1
mov edx, dword [ebx + 0x8c]
movsx edx, word [edx + 0x28]
inc ecx
movzx eax, cx
cmp eax, edx
jl 0x8005835
xor edi, edi
cmp dword [ebx + 0xc], edi
je 0x800586c
movzx eax, word [esi]
push eax
push ebx
push dword [ebp + 0x18]
call fcn.08069bcf
add esp, 0xc
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.08010fe9
cmp eax, edi
pop ecx
pop ecx
jne 0x8005ad7
mov eax, dword [ebp - 4]
mov dword [eax], edi
mov eax, dword [ebp - 0x10]
mov word [eax], di
jmp 0x8005ad5
push 2
pop ecx
cmp eax, ecx
jne 0x800599c
push dword [ebp + 0x3c]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 0x1c]
push eax
push dword [ebx + 0x88]
movzx eax, word [ebx + 0x86]
push eax
lea eax, [ebx + 0x22]
push eax
movzx eax, word [ebx + 0x30]
sub esp, 0x24
push 9
pop ecx
mov edi, esp
push dword [ebx + 0xb4]
lea esi, [ebx + 0x90]
push eax
movzx eax, word [ebx + 0x2e]
push eax
movzx eax, word [ebx + 0x2c]
push eax
movzx eax, word [ebx + 0x2a]
push eax
mov eax, dword [ebp + 0x10]
movzx eax, word [eax]
push eax
push dword [ebp + 0x28]
rep movsd dword es:[edi], dword [esi]
push dword [ebp + 0x2c]
push dword [ebx + 0x8c]
push dword [ebp + 0x24]
push dword [ebp + 0x18]
call fcn.0806883d
add esp, 0x6c
test eax, eax
jne 0x8005ad7
xor esi, esi
cmp dword [ebx + 0x68], esi
je 0x800592d
lea eax, [ebx + 0x7c]
push eax
lea eax, [ebx + 0x74]
push eax
push dword [ebx + 0x8c]
call fcn.08074a6e
add esp, 0xc
cmp dword [ebp - 0x14], esi
je 0x800595c
mov eax, dword [ebp + 0x10]
push dword [eax + 0x38]
push dword [ebp - 0xc]
call fcn.08004e50
test eax, eax
pop ecx
pop ecx
jne 0x8005951
mov word [ebx + 0x84], 2
jmp 0x800595c
mov ax, word [ebp + 0x1c]
mov word [ebx + 0x84], ax
cmp dword [ebx + 0xc], esi
je 0x8005974
mov eax, dword [ebp + 0x10]
movzx eax, word [eax]
push eax
push ebx
push dword [ebp + 0x18]
call fcn.08069bcf
add esp, 0xc
lea eax, [ebx + 0x10]
push eax
push dword [ebp + 8]
call fcn.08010fe9
cmp eax, esi
pop ecx
pop ecx
jne 0x8005ad7
mov dword [ebx + 0x88], esi
mov word [ebx + 0x86], si
jmp 0x8005ad5
cmp eax, 1
jne 0x8005ad5
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edi
mov dword [ebx + 0x1c], ecx
mov dword [ebp + 0x30], edi
mov ecx, dword [ebp + 0xc]
movzx eax, word [ecx + 0x1e]
cmp ax, 1
jbe 0x80059c6
movzx eax, ax
jmp 0x80059c9
xor eax, eax
inc eax
movzx edx, word [ebx + 0x32]
inc edx
cmp edx, eax
ja 0x8005adc
movzx eax, word [ecx + 0x1c]
inc dword [ebp + 0x30]
cmp ax, 3
jbe 0x80059e8
movzx eax, ax
jmp 0x80059eb
push 3
pop eax
movzx ecx, word [ebp + 0x30]
cmp ecx, eax
ja 0x8005adc
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0x20]
push dword [ebp + 0x14]
call fcn.08004eb2
add esp, 0xc
cmp eax, edi
jne 0x8005ad7
movzx eax, word [ebx + 0x32]
mov esi, dword [ebp - 0x20]
inc ax
push eax
push edi
push dword [ebp + 0x20]
push esi
call fcn.08004f15
push esi
push ebx
call fcn.08068974
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea eax, [esi + 0x44]
push eax
lea eax, [esi + 0x42]
push eax
lea eax, [esi + 0x40]
push eax
lea eax, [esi + 0x3e]
push eax
lea eax, [esi + 0x3c]
push eax
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 0x70]
push eax
lea eax, [esi + 0x6c]
push eax
lea eax, [esi + 0x38]
push eax
lea eax, [esi + 0x34]
push eax
lea eax, [ebx + 0x10]
push eax
call fcn.08075a90
add esp, 0x50
cmp dword [ebp - 0x24], edi
mov dword [ebp - 4], eax
je 0x8005a9a
lea eax, [esi + 0x90]
push eax
lea eax, [esi + 0x44]
push eax
call fcn.08067326
lea eax, [esi + 0x44]
push eax
call fcn.08067404
add esp, 0xc
test eax, eax
jne 0x8005a9a
mov dword [esi + 0xb4], edi
mov eax, dword [ebp - 4]
cmp eax, edi
jne 0x8005ad7
mov eax, dword [ebp - 0x10]
or eax, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], eax
je 0x80059b4
cmp eax, edi
je 0x8005ad5
lea eax, [ebx + 0x86]
push eax
lea eax, [ebx + 0x88]
push eax
add ebx, 0x10
push ebx
call fcn.08075c5e
add esp, 0xc
cmp eax, edi
jne 0x8005ad7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov eax, 0x140b
jmp 0x8005ad7