Function at 0x451130
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x318
mov eax, dword [0x4bea30]
xor eax, esp
mov dword [esp + 0x314], eax
push ebx
mov ebx, dword [esp + 0x330]
xor eax, eax
push ebp
push esi
push edi
mov di, word [esp + 0x32c]
mov esi, edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov word [esp + 0xb8], ax
movzx edx, di
jmp 0x4511b0
movzx eax, word [ecx]
add word [esp + eax*2 + 0x98], 1
lea eax, [esp + eax*2 + 0x98]
add edx, 0xffff
add ecx, 2
test dx, dx
jne 0x4511b0
cmp word [esp + 0x98], di
jne 0x4511ec
mov dword [esi], 0
mov word [ebx], dx
xor ax, ax
jmp 0x45169d
movzx ebp, word [ebx]
mov edi, 1
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], edi
mov dx, di
nop
movzx eax, dx
cmp word [esp + eax*2 + 0x98], 0
jne 0x45121d
add dword [esp + 0x14], edi
mov dx, word [esp + 0x14]
cmp dx, 0x10
jbe 0x451200
cmp bp, dx
movzx ecx, dx
mov dword [esp + 0x20], ecx
jae 0x45122f
mov dword [esp + 0x1c], ecx
mov ebp, ecx
mov eax, 0x10
jmp 0x451240
movzx esi, ax
cmp word [esp + esi*2 + 0x98], 0
jne 0x451258
add eax, 0xffff
test ax, ax
jne 0x451240
cmp bp, ax
movzx esi, ax
mov dword [esp + 0x40], esi
jbe 0x45126a
mov dword [esp + 0x1c], esi
mov ebp, esi
mov word [ebx], bp
mov ebx, edi
shl ebx, cl
cmp dx, ax
jae 0x4512a3
jmp 0x451280
movzx edx, dx
movzx edx, word [esp + edx*2 + 0x98]
sub ebx, edx
js 0x451517
add dword [esp + 0x14], edi
mov dx, word [esp + 0x14]
add ebx, ebx
cmp dx, ax
jb 0x451280
movzx edi, word [esp + esi*2 + 0x98]
lea edx, [esp + esi*2 + 0x98]
movzx esi, di
sub ebx, esi
mov dword [esp + 0x4c], ebx
js 0x451517
xor esi, esi
add edi, ebx
add eax, 0xffff
cmp ax, si
mov word [edx], di
mov dword [esp + 0x14], esi
mov word [esp + 0xbe], si
je 0x451300
xor edx, edx
mov di, si
add di, word [esp + edx + 0x9a]
add eax, 0xffff
mov word [esp + edx + 0xc0], di
add edx, 2
cmp ax, si
jne 0x4512e3
mov edx, dword [esp + 0x34]
xor edi, edi
movzx eax, word [edx]
add edx, 2
cmp ax, si
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
je 0x451342
movzx eax, ax
movzx edx, word [esp + eax*2 + 0xbc]
lea eax, [esp + eax*2 + 0xbc]
movzx esi, dx
add edx, 1
mov word [esp + esi*2 + 0xe0], di
mov word [eax], dx
mov edx, dword [esp + 0x18]
xor esi, esi
add edi, 1
cmp di, word [esp + 0x32c]
jb 0x451306
lea edx, [esp + 0xe0]
mov dword [esp + 0x38], esi
mov word [esp + 0xbc], si
mov eax, ebp
mov dword [esp + 0x58], esi
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x18], edx
or edi, 0xffffffff
neg eax
xor edx, edx
cmp ecx, esi
jg 0x451661
lea ebx, [ecx - 1]
mov dword [esp + 0x3c], ebx
lea ebx, [esp + ecx*2 + 0x98]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x30]
movzx ebx, word [ebx]
test bx, bx
je 0x451644
add ebx, 0xffff
lea esi, [eax + ebp]
cmp ecx, esi
mov dword [esp + 0x34], ebx
jle 0x4514f1
movzx edx, bx
add edx, 1
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x40]
add eax, ebp
mov dword [esp + 0x48], eax
movzx eax, ax
sub edx, eax
movzx edx, dx
add esi, ebp
add edi, 1
cmp dx, bp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x54], eax
jbe 0x4513eb
movzx edx, bp
sub ecx, eax
movzx eax, cx
mov dword [esp + 0x14], eax
mov bl, byte [esp + 0x14]
mov cl, bl
mov eax, 1
shl eax, cl
mov ebp, 1
movzx eax, ax
movzx ecx, ax
cmp ecx, dword [esp + 0x50]
jle 0x451453
add dword [esp + 0x14], ebp
mov esi, dword [esp + 0x30]
mov ecx, 0xffff
sub ecx, dword [esp + 0x34]
add eax, ecx
cmp word [esp + 0x14], dx
jae 0x45144b
lea esp, [esp]
movzx ecx, word [esi + 2]
add esi, 2
add eax, eax
cmp ax, cx
jbe 0x45144b
add dword [esp + 0x14], ebp
sub eax, ecx
cmp word [esp + 0x14], dx
jb 0x451430
mov bl, byte [esp + 0x14]
mov esi, dword [esp + 0x2c]
mov cl, bl
shl ebp, cl
movzx ebp, bp
movzx edx, bp
lea eax, [edx*8 + 8]
push eax
mov dword [esp + 0x30], ebp
call fcn.0047aa69
add esp, 4
test eax, eax
je 0x451671
mov ecx, dword [esp + 0x44]
add ebp, 1
add word [0x4c4b90], bp
lea edx, [eax + 8]
add eax, 4
test edi, edi
mov dword [ecx], edx
mov dword [esp + 0x44], eax
mov dword [eax], 0
mov dword [esp + edi*4 + 0x58], edx
je 0x4514dd
movzx ecx, byte [esp + 0x54]
mov al, byte [esp + 0x1c]
mov ebp, dword [esp + 0x38]
mov byte [esp + 0x25], al
sub cl, al
movzx eax, bp
add bl, 0x10
shr eax, cl
mov ecx, dword [esp + edi*4 + 0x54]
mov byte [esp + 0x24], bl
mov word [esp + edi*2 + 0xbc], bp
mov ebp, dword [esp + 0x24]
mov ebx, edx
mov dword [ecx + eax*8], ebp
mov dword [esp + 0x28], ebx
mov dword [ecx + eax*8 + 4], ebx
mov ecx, dword [esp + 0x20]
cmp ecx, esi
mov eax, dword [esp + 0x48]
mov ebp, dword [esp + 0x1c]
jg 0x4513c4
movzx esi, word [esp + 0x32c]
mov bl, cl
sub bl, al
mov byte [esp + 0x25], bl
lea ebx, [esp + esi*2 + 0xe0]
mov esi, dword [esp + 0x18]
cmp esi, ebx
jb 0x451520
mov byte [esp + 0x24], 0x63
jmp 0x45156e
mov ax, 2
jmp 0x45169d
movzx esi, word [esi]
mov bx, word [esp + 0x330]
cmp si, bx
jae 0x451541
cmp si, 0x100
setb bl
add bl, 0xf
mov byte [esp + 0x24], bl
jmp 0x451564
movzx ebx, bx
movzx esi, si
sub esi, ebx
mov ebx, dword [esp + 0x338]
add esi, esi
mov bl, byte [esi + ebx]
mov byte [esp + 0x24], bl
mov ebx, dword [esp + 0x334]
mov si, word [esi + ebx]
add dword [esp + 0x18], 2
mov word [esp + 0x28], si
mov ebx, dword [esp + 0x38]
sub ecx, eax
mov esi, 1
shl esi, cl
mov cx, ax
shr bx, cl
movzx esi, si
movzx ecx, bx
cmp cx, word [esp + 0x2c]
mov dword [esp + 0x14], ecx
jae 0x4515b4
mov ebx, dword [esp + 0x24]
add dword [esp + 0x14], esi
movzx ecx, cx
mov dword [edx + ecx*8], ebx
mov ebx, dword [esp + 0x28]
mov dword [edx + ecx*8 + 4], ebx
mov cx, word [esp + 0x14]
cmp cx, word [esp + 0x2c]
jb 0x451592
mov ecx, dword [esp + 0x3c]
mov esi, 1
shl esi, cl
movzx ecx, si
mov esi, dword [esp + 0x38]
mov ebx, ecx
and ebx, esi
test bx, bx
mov dword [esp + 0x14], ecx
je 0x4515e7
shr word [esp + 0x14], 1
xor esi, ecx
mov ecx, dword [esp + 0x14]
mov ebx, ecx
and ebx, esi
test bx, bx
jne 0x4515d3
xor esi, ecx
mov ecx, eax
mov ebx, 1
shl ebx, cl
movzx ecx, word [esp + edi*2 + 0xbc]
mov dword [esp + 0x38], esi
movzx esi, si
sub ebx, 1
and ebx, esi
cmp ebx, ecx
je 0x45162f
lea ebx, [ebx]
sub eax, ebp
mov ecx, eax
mov ebx, 1
shl ebx, cl
movzx ecx, word [esp + edi*2 + 0xba]
sub edi, 1
sub ebx, 1
and ebx, esi
cmp ebx, ecx
jne 0x451610
mov ebx, dword [esp + 0x34]
test bx, bx
mov ecx, dword [esp + 0x20]
jne 0x4513a5
mov esi, dword [esp + 0x40]
add dword [esp + 0x30], 2
add dword [esp + 0x3c], 1
add ecx, 1
cmp ecx, esi
mov dword [esp + 0x20], ecx
jle 0x451395
mov ebx, dword [esp + 0x4c]
test ebx, ebx
je 0x45169b
cmp esi, 1
je 0x45169b
mov eax, 1
jmp 0x45169d
test edi, edi
je 0x451695
mov eax, dword [esp + 0x58]
test eax, eax
je 0x451695
lea ecx, [ecx]
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.0047a98c
add esp, 4
test esi, esi
mov eax, esi
jne 0x451680
mov ax, 3
jmp 0x45169d
xor eax, eax
mov ecx, dword [esp + 0x324]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047a105
add esp, 0x318
ret