Function at 0x6829a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x738]
push edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], ebx
je 0x682be1
push eax
call fcn.0045c0b0
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x682be1
push ebp
add eax, 0x14
push 4
push eax
mov eax, dword [0x829474]
lea ecx, [eax*4 + 0x820de0]
push ecx
call fcn.0045cba0
mov eax, dword [0x829474]
add esp, 0x10
lea edi, [eax*4 + 0x820de0]
inc eax
cmp eax, 8
mov dword [esp + 0x18], edi
mov dword [0x829474], eax
jl 0x682a0c
mov dword [0x829474], ebp
push ebp
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x682bd9
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], ebp
sub edx, ecx
cmp edx, eax
jne 0x682a54
call fcn.00406630
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x682a61
call fcn.00406630
mov ecx, 0x83f450
call fcn.004065e0
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x682a8b
mov edx, ecx
or edx, eax
je 0x682a8b
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x682bd9
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x682bd9
mov esi, dword [0x829478]
mov dword [0x829468], eax
mov eax, dword [0x8294e8]
mov byte [0x81c6fc], 1
cmp eax, ebp
mov dword [esp + 0x14], ebp
not esi
jle 0x682b40
mov dword [esp + 0x10], 0x820e44
jmp 0x682aca
xor ebp, ebp
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
cmp eax, ebp
je 0x682b18
mov ecx, dword [eax + 4]
cmp ecx, ebp
jle 0x682b18
mov edi, dword [eax]
mov ebp, dword [edi + 0xc]
sar ebp, 2
test edi, edi
je 0x682b18
xor ebx, ebx
test ecx, ecx
jle 0x682b18
mov ecx, edi
call fcn.00406620
xor esi, eax
lea eax, [edi + 0x14]
test ebp, ebp
jle 0x682b09
mov ecx, ebp
mov edx, dword [eax]
add eax, 4
xor esi, edx
dec ecx
jne 0x682aff
mov ecx, dword [esp + 0x10]
mov edi, dword [edi + 4]
inc ebx
mov edx, dword [ecx]
cmp ebx, dword [edx + 4]
jl 0x682aed
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [0x8294e8]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
jl 0x682ac8
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
cmp esi, dword [0x8294d8]
je 0x682b4d
call fcn.00406630
cmp dword [0x8294e8], ebp
je 0x682bd2
mov ecx, 0x829464
mov dword [esp + 0x10], ebp
call fcn.00406620
test eax, eax
je 0x682b94
mov ecx, dword [0x829464]
lea eax, [esp + 0x10]
push eax
push ecx
call fcn.00407b70
add esp, 8
test al, al
je 0x682b8f
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x682b8f
cmp dword [eax], 0x29874362
je 0x682b94
call fcn.00406630
mov ecx, 0x8294b0
mov dword [esp + 0x10], ebp
call fcn.00406620
test eax, eax
je 0x682bd2
mov eax, dword [0x8294b0]
lea edx, [esp + 0x10]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x682bcd
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x682bcd
cmp dword [eax], 0xbad0bad
je 0x682bd2
call fcn.00406630
mov byte [0x81c6fc], 0
cmp edi, ebp
je 0x682be1
mov esi, dword [edi]
jmp 0x682be7
mov esi, dword [0x89fe8c]
mov edi, dword [esp + 0x28]
mov edx, dword [edi + 0x28]
lea ecx, [edi + 0x28]
call dword [edx + 8]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 4]
cmp eax, 0x20a03
jne 0x682c1a
mov ecx, edi
call fcn.007238a0
test al, al
je 0x682c1a
mov ecx, ebx
call fcn.007204c0
mov esi, dword [eax + 0x88]
mov ecx, dword [esp + 0x24]
mov eax, dword [ebx]
push esi
push 0x3f800000
push ecx
mov ecx, ebx
call dword [eax + 0x54]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8